[proxy] cleaner default args
This commit is contained in:
1 parent
fa6707effa
commit
b8595b9062
1 file changed
+4
-9
@@ -19,7 +19,10 @@ func main() {
|
|||||||
var (
|
var (
|
||||||
debug bool
|
debug bool
|
||||||
justVersion bool
|
justVersion bool
|
||||||
c proxy.Config
|
c = proxy.Config{
|
||||||
|
DockerAddr: defaultDockerAddr,
|
||||||
|
ListenAddr: defaultListenAddr,
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
c.Version = version
|
c.Version = version
|
||||||
@@ -45,14 +48,6 @@ func main() {
|
|||||||
InitDefaultLogging(true)
|
InitDefaultLogging(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.DockerAddr == "" {
|
|
||||||
c.DockerAddr = defaultDockerAddr
|
|
||||||
}
|
|
||||||
|
|
||||||
if c.ListenAddr == "" {
|
|
||||||
c.ListenAddr = defaultListenAddr
|
|
||||||
}
|
|
||||||
|
|
||||||
p, err := proxy.NewProxy(c)
|
p, err := proxy.NewProxy(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Error.Fatalf("Could not start proxy: %s", err)
|
Error.Fatalf("Could not start proxy: %s", err)
|
||||||
|
|||||||
Reference in new issue
Block a user