libcontainer: network_linux.go: fix go vet
This patch fixes the following go vet warnings: ``` libcontainer/network_linux.go:96: github.com/vishvananda/netlink.Device composite literal uses unkeyed fields libcontainer/network_linux.go:114: github.com/vishvananda/netlink.Device composite literal uses unkeyed fields ``` Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
36015470c2
commit
3029587085
|
@ -93,7 +93,7 @@ func (l *loopback) create(n *network, nspid int) error {
|
|||
}
|
||||
|
||||
func (l *loopback) initialize(config *network) error {
|
||||
return netlink.LinkSetUp(&netlink.Device{netlink.LinkAttrs{Name: "lo"}})
|
||||
return netlink.LinkSetUp(&netlink.Device{LinkAttrs: netlink.LinkAttrs{Name: "lo"}})
|
||||
}
|
||||
|
||||
func (l *loopback) attach(n *configs.Network) (err error) {
|
||||
|
@ -111,7 +111,7 @@ type veth struct {
|
|||
}
|
||||
|
||||
func (v *veth) detach(n *configs.Network) (err error) {
|
||||
return netlink.LinkSetMaster(&netlink.Device{netlink.LinkAttrs{Name: n.HostInterfaceName}}, nil)
|
||||
return netlink.LinkSetMaster(&netlink.Device{LinkAttrs: netlink.LinkAttrs{Name: n.HostInterfaceName}}, nil)
|
||||
}
|
||||
|
||||
// attach a container network interface to an external network
|
||||
|
|
Loading…
Reference in New Issue