Skip to content

Commit

Permalink
feat: add version flag to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
ngshiheng committed Oct 5, 2024
1 parent a118cc8 commit 3dff1ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/mym/mym.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"flag"
"os"

"github.com/carlmjohnson/versioninfo"
"github.com/ngshiheng/michelin-my-maps/v2/pkg/crawler"
log "github.com/sirupsen/logrus"
)
Expand All @@ -13,6 +14,7 @@ func main() {
logLevel = flag.String("log", log.InfoLevel.String(), "log level (debug, info, warning, error, fatal, panic)")
helpFlag = flag.Bool("help", false, "show help message")
)
versioninfo.AddFlag(nil)
flag.Parse()

if *helpFlag {
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/ngshiheng/michelin-my-maps/v2
go 1.21

require (
github.com/carlmjohnson/versioninfo v0.22.5
github.com/gocolly/colly/v2 v2.1.0
github.com/nyaruka/phonenumbers v1.4.0
github.com/sirupsen/logrus v1.9.3
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ github.com/antchfx/xpath v1.1.6/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNY
github.com/antchfx/xpath v1.1.8/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
github.com/antchfx/xpath v1.2.0 h1:mbwv7co+x0RwgeGAOHdrKy89GvHaGvxxBtPK0uF9Zr8=
github.com/antchfx/xpath v1.2.0/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs=
github.com/carlmjohnson/versioninfo v0.22.5 h1:O00sjOLUAFxYQjlN/bzYTuZiS0y6fWDQjMRvwtKgwwc=
github.com/carlmjohnson/versioninfo v0.22.5/go.mod h1:QT9mph3wcVfISUKd0i9sZfVrPviHuSF+cUtLjm2WSf8=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down

0 comments on commit 3dff1ae

Please sign in to comment.