Skip to content

Commit

Permalink
feat: add version command
Browse files Browse the repository at this point in the history
  • Loading branch information
thoas committed Jan 22, 2024
1 parent c4558e0 commit 0764311
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/mover/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var (
path string
dsn string
verbose bool
version bool
action string
)

Expand All @@ -28,8 +29,14 @@ func main() {
flag.StringVar(&dsn, "dsn", "", "database dsn")
flag.StringVar(&action, "action", "", "action to execute")
flag.BoolVar(&verbose, "verbose", false, "verbose logs")
flag.BoolVar(&version, "version", false, "show version")
flag.Parse()

if version {
fmt.Println("mover version", etl.Version)
return
}

var (
ctx = context.Background()
logger *zap.Logger
Expand Down
5 changes: 5 additions & 0 deletions etl/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package etl

const (
Version = 0.1
)

0 comments on commit 0764311

Please sign in to comment.