From 8e52c6fe10d72960a8cf0859a6cbd4465dddfb14 Mon Sep 17 00:00:00 2001 From: Matias <83959431+mativm02@users.noreply.github.com> Date: Wed, 15 Nov 2023 18:23:55 -0300 Subject: [PATCH] linting --- main.go | 11 +++++++++-- pumps/version.go | 6 ++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 82511f6b0..31bdb2818 100644 --- a/main.go +++ b/main.go @@ -35,6 +35,7 @@ var log = logger.GetLogger() var mainPrefix = "main" var ( + //lint:ignore U1000 Function is used when version flag is passed in command line help = kingpin.CommandLine.HelpFlag.Short('h') conf = kingpin.Flag("conf", "path to the config file").Short('c').Default("pump.conf").String() demoMode = kingpin.Flag("demo", "pass orgID string to generate demo data").Default("").String() @@ -45,7 +46,8 @@ var ( demoRecordsPerHour = kingpin.Flag("demo-records-per-hour", "flag that determines the number of records per hour for the analytics records").Default("0").Int() demoFutureData = kingpin.Flag("demo-future-data", "flag that determines if the demo data should be in the future").Default("false").Bool() debugMode = kingpin.Flag("debug", "enable debug mode").Bool() - version = kingpin.Version(pumps.Version) + //lint:ignore U1000 Function is used when version flag is passed in command line + version = kingpin.Version(pumps.Version) ) func Init() { @@ -123,7 +125,12 @@ func storeVersion() { versionStore.KeyPrefix = "version-check-" versionStore.Config = versionConf versionStore.Connect() - versionStore.SetKey("pump", pumps.Version, 0) + err := versionStore.SetKey("pump", pumps.Version, 0) + if err != nil { + log.WithFields(logrus.Fields{ + "prefix": mainPrefix, + }).Error("Error storing version: ", err) + } } func initialisePumps() { diff --git a/pumps/version.go b/pumps/version.go index 8b3211c21..119270cfb 100644 --- a/pumps/version.go +++ b/pumps/version.go @@ -1,6 +1,8 @@ package pumps var ( - Version = "v1.8.0" - BuiltBy, Commit, BuildDate string + Version = "v1.8.0" + BuiltBy string + Commit string + BuildDate string )