@@ -3,38 +3,38 @@ package cmd
3
3
import (
4
4
"fmt"
5
5
6
- "github.com/zackijack/go-project/internal/version"
7
6
"github.com/spf13/cobra"
7
+ "github.com/zackijack/go-project/internal/version"
8
8
)
9
9
10
10
const versionDesc = `
11
- Showing who exactly go-project is .
12
- This will print a representation profile of go-project.
11
+ Show the version for go-project.
12
+ This will print a representation the version of go-project.
13
13
The output will look something like this:
14
14
15
- Version: v1.0.0
16
- Git Commit: ff52399e51bb880526e9cd0ed8386f6433b74da1
17
- Build Date: 2020-07-27-17:07:02
18
- Go Version: go1.14.6
19
- OS Arch: darwin amd64
15
+ Version : v1.0.0
16
+ Git Commit : ff52399e51bb880526e9cd0ed8386f6433b74da1
17
+ Build Date : 2020-07-27-17:07:02
18
+ Go Version : go1.16.5
19
+ OS / Arch : darwin / amd64
20
20
21
21
- Version is the semantic version of the release.
22
22
- Git Commit is the SHA for the commit that this version was built from.
23
23
- Build Date is the date when the application was built.
24
24
- Go Version is the version of the Go compiler used.
25
- - OS Arch is the version of the operating system and architecture was built for.
25
+ - OS / Arch is the version of the operating system and architecture was built for.
26
26
`
27
27
28
28
var versionCmd = & cobra.Command {
29
29
Use : "version" ,
30
30
Short : "Reveal go-project personal information" ,
31
31
Long : versionDesc ,
32
32
Run : func (cmd * cobra.Command , args []string ) {
33
- fmt .Println ("Version:" , version .Version )
34
- fmt .Println ("Git Commit:" , version .GitCommit )
35
- fmt .Println ("Build Date:" , version .BuildDate )
36
- fmt .Println ("Go Version:" , version .GoVersion )
37
- fmt .Println ("OS Arch:" , version .OsArch )
33
+ fmt .Println ("Version :" , version .Version )
34
+ fmt .Println ("Git Commit :" , version .GitCommit )
35
+ fmt .Println ("Build Date :" , version .BuildDate )
36
+ fmt .Println ("Go Version :" , version .GoVersion )
37
+ fmt .Println ("OS / Arch :" , version .OsArch )
38
38
},
39
39
}
40
40
0 commit comments