package chain import "fmt" type Policy int8 const ( PolicyAccept Policy = iota + 1 PolicyDrop ) func (p Policy) String() string { switch p { case PolicyAccept: return "accept" case PolicyDrop: return "drop" default: return fmt.Sprintf("unknown policy %d", p) } }