diff --git a/libnetwork/osl/interface_freebsd.go b/libnetwork/osl/interface_freebsd.go deleted file mode 100644 index 9c0141fd9b..0000000000 --- a/libnetwork/osl/interface_freebsd.go +++ /dev/null @@ -1,4 +0,0 @@ -package osl - -// IfaceOption is a function option type to set interface options -type IfaceOption func() diff --git a/libnetwork/osl/interface_linux.go b/libnetwork/osl/interface_linux.go index 561e7fc7e0..ee1b4ab842 100644 --- a/libnetwork/osl/interface_linux.go +++ b/libnetwork/osl/interface_linux.go @@ -14,9 +14,6 @@ import ( "github.com/vishvananda/netns" ) -// IfaceOption is a function option type to set interface options -type IfaceOption func(i *nwIface) - type nwIface struct { srcName string dstName string diff --git a/libnetwork/osl/interface_unsupported.go b/libnetwork/osl/interface_unsupported.go new file mode 100644 index 0000000000..55a6ae73f1 --- /dev/null +++ b/libnetwork/osl/interface_unsupported.go @@ -0,0 +1,6 @@ +//go:build !linux +// +build !linux + +package osl + +type nwIface struct{} diff --git a/libnetwork/osl/interface_windows.go b/libnetwork/osl/interface_windows.go deleted file mode 100644 index 9c0141fd9b..0000000000 --- a/libnetwork/osl/interface_windows.go +++ /dev/null @@ -1,4 +0,0 @@ -package osl - -// IfaceOption is a function option type to set interface options -type IfaceOption func() diff --git a/libnetwork/osl/sandbox.go b/libnetwork/osl/sandbox.go index 52117a4c05..f9448212c6 100644 --- a/libnetwork/osl/sandbox.go +++ b/libnetwork/osl/sandbox.go @@ -17,6 +17,9 @@ const ( SandboxTypeLoadBalancer = iota ) +// IfaceOption is a function option type to set interface options. +type IfaceOption func(i *nwIface) + // Sandbox represents a network sandbox, identified by a specific key. It // holds a list of Interfaces, routes etc, and more can be added dynamically. type Sandbox interface {