github.com/vishvananda/netlink@v1.3.0/chain.go (about) 1 package netlink 2 3 import ( 4 "fmt" 5 ) 6 7 // Chain contains the attributes of a Chain 8 type Chain struct { 9 Parent uint32 10 Chain uint32 11 } 12 13 func (c Chain) String() string { 14 return fmt.Sprintf("{Parent: %d, Chain: %d}", c.Parent, c.Chain) 15 } 16 17 func NewChain(parent uint32, chain uint32) Chain { 18 return Chain{ 19 Parent: parent, 20 Chain: chain, 21 } 22 }