Browse Source

libnetwork: overlayutils: remove redundant init()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 years ago
parent
commit
17feabcba0
1 changed files with 2 additions and 6 deletions
  1. 2 6
      libnetwork/drivers/overlay/overlayutils/utils.go

+ 2 - 6
libnetwork/drivers/overlay/overlayutils/utils.go

@@ -8,14 +8,10 @@ import (
 
 var (
 	mutex        sync.RWMutex
-	vxlanUDPPort uint32
+	vxlanUDPPort = defaultVXLANUDPPort
 )
 
-const defaultVXLANUDPPort = 4789
-
-func init() {
-	vxlanUDPPort = defaultVXLANUDPPort
-}
+const defaultVXLANUDPPort uint32 = 4789
 
 // ConfigVXLANUDPPort configures the VXLAN UDP port (data path port) number.
 // If no port is set, the default (4789) is returned. Valid port numbers are