diff --git a/libnetwork/osl/interface_freebsd.go b/libnetwork/osl/interface_freebsd.go deleted file mode 100644 index 9c0141fd9ba65e40c2e202c82b7fe5f8b71948c3..0000000000000000000000000000000000000000 --- 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 561e7fc7e0a596bcaa583cdd2b8610362760a6f6..ee1b4ab8424bb79a874835dbef96f973cf0dc43e 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 0000000000000000000000000000000000000000..55a6ae73f1773dad86ffc98cc17e647d63a400b4 --- /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 9c0141fd9ba65e40c2e202c82b7fe5f8b71948c3..0000000000000000000000000000000000000000 --- 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 52117a4c053174326c5489bf2d0314a13e501bac..f9448212c6bbe777dff7f784c6c0fd504998ac42 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 {