Skip to content

Commit

Permalink
refactor: Move version to own package
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsika committed Aug 3, 2021
1 parent af77639 commit 503e6de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ import (
"fmt"

"github.com/sikalabs/slut/cmd/root"
"github.com/sikalabs/slut/version"
"github.com/spf13/cobra"
)

var version string = "v0.6.0-dev"

var VersionCmd = &cobra.Command{
Use: "version",
Short: "Prints version",
Args: cobra.NoArgs,
Run: func(c *cobra.Command, args []string) {
fmt.Printf("%s\n", version)
fmt.Printf("%s\n", version.Version)
},
}

Expand Down
3 changes: 3 additions & 0 deletions version/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package version

var Version string = "v0.6.0-dev"

0 comments on commit 503e6de

Please sign in to comment.