From 817432c0f873826181a7a2271fe1c0e60c6c4a7c Mon Sep 17 00:00:00 2001 From: "nebojsa.urosevic" Date: Thu, 8 Nov 2018 09:23:07 +0100 Subject: [PATCH] Default value --- commands.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/commands.go b/commands.go index f4ac2dd..1c75f32 100644 --- a/commands.go +++ b/commands.go @@ -14,13 +14,13 @@ var path string var network string func init() { - rootCmd.PersistentFlags().StringVar(&targetSchema, "target-schema", "", "Blockchain rpc schema.") - rootCmd.PersistentFlags().StringVar(&targetHost, "target-host", "", "Blockchain rpc host.") - rootCmd.PersistentFlags().StringVar(&targetPort, "target-port", "", "Blockchain rpc port.") - rootCmd.PersistentFlags().StringVar(&proxyHost, "proxy-host", "", "Proxy host.") - rootCmd.PersistentFlags().StringVar(&proxyPort, "proxy-port", "", "Proxy port.") - rootCmd.PersistentFlags().StringVar(&path, "path", "", "Path to the project build folder.") - rootCmd.PersistentFlags().StringVar(&network, "network", "", "Network id.") + proxyCmd.PersistentFlags().StringVar(&targetSchema, "target-schema", "http", "Blockchain rpc schema.") + proxyCmd.PersistentFlags().StringVar(&targetHost, "target-host", "127.0.0.1", "Blockchain rpc host.") + proxyCmd.PersistentFlags().StringVar(&targetPort, "target-port", "8545", "Blockchain rpc port.") + proxyCmd.PersistentFlags().StringVar(&proxyHost, "proxy-host", "127.0.0.1", "Proxy host.") + proxyCmd.PersistentFlags().StringVar(&proxyPort, "proxy-port", "9545", "Proxy port.") + proxyCmd.PersistentFlags().StringVar(&path, "path", "", "Path to the project build folder.") + proxyCmd.PersistentFlags().StringVar(&network, "network", "", "Network id.") rootCmd.AddCommand(proxyCmd) }