libnet/ipams: Unconditionally call windowsipam.Register
This function is made a no-op on non-windows platform. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
parent
a7e5450a94
commit
9d26d5cccd
5 changed files with 14 additions and 16 deletions
|
@ -1,5 +1,3 @@
|
|||
//go:build windows
|
||||
|
||||
package ipams
|
||||
|
||||
import (
|
|
@ -1,14 +0,0 @@
|
|||
//go:build linux || freebsd || darwin
|
||||
|
||||
package ipams
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/libnetwork/ipamapi"
|
||||
"github.com/docker/docker/libnetwork/ipams/defaultipam"
|
||||
"github.com/docker/docker/libnetwork/ipamutils"
|
||||
)
|
||||
|
||||
// Register registers the built-in ipam service with libnetwork.
|
||||
func Register(r ipamapi.Registerer, addressPools []*ipamutils.NetworkToSplit) error {
|
||||
return defaultipam.Register(r, addressPools)
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
//go:build windows
|
||||
|
||||
package windowsipam
|
||||
|
||||
import (
|
||||
|
|
10
libnetwork/ipams/windowsipam/windowsipam_other.go
Normal file
10
libnetwork/ipams/windowsipam/windowsipam_other.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
//go:build !windows
|
||||
|
||||
package windowsipam
|
||||
|
||||
import "github.com/docker/docker/libnetwork/ipamapi"
|
||||
|
||||
// Register is a no-op -- windowsipam is only supported on Windows.
|
||||
func Register(_ ipamapi.Registerer) error {
|
||||
return nil
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
//go:build windows
|
||||
|
||||
package windowsipam
|
||||
|
||||
import (
|
||||
|
|
Loading…
Add table
Reference in a new issue