From a370f8ed7cba74982fd301a2c88bc23d8b8f7d92 Mon Sep 17 00:00:00 2001 From: TeoV Date: Mon, 4 Jun 2018 09:44:57 -0400 Subject: [PATCH] Rename script and update variable names in cgr-console --- cmd/cgr-console/cgr-console.go | 20 +++++++++---------- .../{script.sh => generate_certificate.sh} | 0 2 files changed, 10 insertions(+), 10 deletions(-) rename data/tls/{script.sh => generate_certificate.sh} (100%) diff --git a/cmd/cgr-console/cgr-console.go b/cmd/cgr-console/cgr-console.go index fcc28d7d3..ad180384f 100644 --- a/cmd/cgr-console/cgr-console.go +++ b/cmd/cgr-console/cgr-console.go @@ -36,14 +36,14 @@ import ( ) var ( - historyFN = os.Getenv("HOME") + "/.cgr_history" - version = flag.Bool("version", false, "Prints the application version.") - verbose = flag.Bool("verbose", false, "Show extra info about command execution.") - server = flag.String("server", "127.0.0.1:2012", "server address host:port") - rpc_encoding = flag.String("rpc_encoding", "json", "RPC encoding used ") - certificate_path = flag.String("crt_path", "", "path to certificate for tls connection") - key_path = flag.String("key_path", "", "path to key for tls connection") - client *rpcclient.RpcClient + historyFN = os.Getenv("HOME") + "/.cgr_history" + version = flag.Bool("version", false, "Prints the application version.") + verbose = flag.Bool("verbose", false, "Show extra info about command execution.") + server = flag.String("server", "127.0.0.1:2012", "server address host:port") + rpcEncoding = flag.String("rpc_encoding", "json", "RPC encoding used ") + certificatePath = flag.String("crt_path", "", "path to certificate for tls connection") + keyPath = flag.String("key_path", "", "path to key for tls connection") + client *rpcclient.RpcClient ) func executeCommand(command string) { @@ -121,8 +121,8 @@ func main() { return } var err error - client, err = rpcclient.NewRpcClient("tcp", *server, *key_path, *certificate_path, 3, 3, - time.Duration(1*time.Second), time.Duration(5*time.Minute), *rpc_encoding, nil, false) + client, err = rpcclient.NewRpcClient("tcp", *server, *keyPath, *certificatePath, 3, 3, + time.Duration(1*time.Second), time.Duration(5*time.Minute), *rpcEncoding, nil, false) if err != nil { flag.PrintDefaults() log.Fatal("Could not connect to server " + *server) diff --git a/data/tls/script.sh b/data/tls/generate_certificate.sh similarity index 100% rename from data/tls/script.sh rename to data/tls/generate_certificate.sh