Task: 5544441 Refactor packaging for better testability

This commit is contained in:
Onur Filiz 2016-03-01 18:14:20 -08:00
Родитель efba38effa
Коммит 9aec1d5ff2
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -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"

Просмотреть файл

@ -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