From 1dd42d3c14fd8ecc109aa55692c571778233a96e Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Tue, 5 Nov 2024 23:27:28 +0100 Subject: [PATCH] refactor: rename config file cli parameter for consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - rename configfile parameter to parameter_configfile - update references to the configfile parameter 🤖 --- cmd/client/app.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/client/app.go b/cmd/client/app.go index 1fb7738..e29f38f 100644 --- a/cmd/client/app.go +++ b/cmd/client/app.go @@ -61,18 +61,18 @@ func Start() { var ( defaultConfigFile = "~/.config/ChronoTomato.yml" - parameter_url = flag.String("url", "", "GoTomato Server URL (eg ws://localhost:8080/ws)") - parameter_password = flag.String("password", "", "Control password for pomodoro session") - configfile = flag.String("config", defaultConfigFile, "Path to config file") + parameter_url = flag.String("url", "", "GoTomato Server URL (eg ws://localhost:8080/ws)") + parameter_password = flag.String("password", "", "Control password for pomodoro session") + parameter_configfile = flag.String("config", defaultConfigFile, "Path to config file") ) flag.Parse() // read passed config file or try to use default config - if *configfile != defaultConfigFile { - config = helper.ParseConfig(*configfile) + if *parameter_configfile != defaultConfigFile { + config = helper.ParseConfig(*parameter_configfile) } else { - if helper.FileExists(*configfile) { - config = helper.ParseConfig(*configfile) + if helper.FileExists(defaultConfigFile) { + config = helper.ParseConfig(defaultConfigFile) } }