Task: 5544441 Refactor packaging for better testability
This commit is contained in:
Родитель
efba38effa
Коммит
9aec1d5ff2
|
@ -1,7 +1,7 @@
|
||||||
// Copyright Microsoft Corp.
|
// Copyright Microsoft Corp.
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
|
|
||||||
package ipamNull
|
package ipam
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
6
main.go
6
main.go
|
@ -9,7 +9,7 @@ import (
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
ipamNull "github.com/sharmasushant/penguin/ipam/null"
|
"github.com/sharmasushant/penguin/ipam"
|
||||||
"github.com/sharmasushant/penguin/log"
|
"github.com/sharmasushant/penguin/log"
|
||||||
"github.com/sharmasushant/penguin/network"
|
"github.com/sharmasushant/penguin/network"
|
||||||
)
|
)
|
||||||
|
@ -25,7 +25,7 @@ func printHelp() {
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var netPlugin network.NetPlugin
|
var netPlugin network.NetPlugin
|
||||||
var ipamPlugin ipamNull.IpamPlugin
|
var ipamPlugin ipam.IpamPlugin
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
// Set defaults.
|
// Set defaults.
|
||||||
|
@ -53,7 +53,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
case "ipam":
|
case "ipam":
|
||||||
ipamPlugin, err = ipamNull.NewPlugin(ipamVersion)
|
ipamPlugin, err = ipam.NewPlugin(ipamVersion)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Failed to create IPAM plugin %v\n", err)
|
fmt.Printf("Failed to create IPAM plugin %v\n", err)
|
||||||
return
|
return
|
||||||
|
|
Загрузка…
Ссылка в новой задаче