Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mativm02 committed Nov 15, 2023
1 parent 9d2bb96 commit 8e52c6f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 9 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down
6 changes: 4 additions & 2 deletions pumps/version.go
Original file line number Diff line number Diff line change
@@ -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
)

0 comments on commit 8e52c6f

Please sign in to comment.