Skip to content

Commit

Permalink
libnet/ipams: Unconditionally call windowsipam.Register
Browse files Browse the repository at this point in the history
This function is made a no-op on non-windows platform.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
  • Loading branch information
akerouanton committed Apr 26, 2024
1 parent ae9e431 commit eda4750
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build windows

package ipams

import (
Expand Down
14 changes: 0 additions & 14 deletions libnetwork/ipams/drivers_unix.go

This file was deleted.

2 changes: 2 additions & 0 deletions libnetwork/ipams/windowsipam/windowsipam.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build windows

package windowsipam

import (
Expand Down
10 changes: 10 additions & 0 deletions libnetwork/ipams/windowsipam/windowsipam_other.go
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 2 additions & 0 deletions libnetwork/ipams/windowsipam/windowsipam_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build windows

package windowsipam

import (
Expand Down

0 comments on commit eda4750

Please sign in to comment.