From afcd7c4198bfc4ad0ba1b30edd3711711eed8150 Mon Sep 17 00:00:00 2001 From: surtur Date: Sat, 12 Aug 2023 14:57:56 +0200 Subject: [PATCH] go(run.go): consolidate flag names --- run.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/run.go b/run.go index f404660..77d483f 100644 --- a/run.go +++ b/run.go @@ -60,12 +60,12 @@ along with this program. If not, see .` ) var ( - host = flag.String("host", "unset", "host address to listen on") - port = flag.Int("port", 0, "TCP port to listen on") + hostFlag = flag.String("host", "unset", "host address to listen on") + portFlag = flag.Int("port", 0, "TCP port to listen on") configFlag = flag.String("config", "config.dhall", "Default path of the config file") configIsPathFlag = flag.Bool("configIsPath", true, "Whether the provided config is path or raw config") - devel = flag.Bool("devel", false, "Run the application in dev mode, connect to a local browser-sync instance for hot-reloading") - license = flag.Bool("license", false, "Print licensing information and exit") + develFlag = flag.Bool("devel", false, "Run the application in dev mode, connect to a local browser-sync instance for hot-reloading") + licenseFlag = flag.Bool("license", false, "Print licensing information and exit") versionFlag = flag.Bool("version", false, "Print version and exit") importFlag = flag.String("import", "", "Path to import breach data from") version = "dev" @@ -78,7 +78,7 @@ var ( func run() error { //nolint:gocognit flag.Parse() - if *license { + if *licenseFlag { fmt.Fprintln(os.Stderr, licenseHeader) return nil } @@ -129,7 +129,7 @@ func run() error { //nolint:gocognit setting := settings.New() setting.Consolidate( - conf, host, port, devel, version, + conf, hostFlag, portFlag, develFlag, version, ) // expected connstring form for "github.com/xiaoqidun/entps":