File tree Expand file tree Collapse file tree 4 files changed +70
-0
lines changed
bots/coniksbot/internal/cmd
client/coniksclient/internal/cmd
keyserver/coniksserver/internal/cmd Expand file tree Collapse file tree 4 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ package cmd
2+
3+ import (
4+ "fmt"
5+
6+ "github.com/coniks-sys/coniks-go/internal"
7+ "github.com/spf13/cobra"
8+ )
9+
10+ var versionCmd = & cobra.Command {
11+ Use : "version" ,
12+ Short : "Print the version number of coniksbot." ,
13+ Long : `Print the version number of coniksbot.` ,
14+ Run : func (cmd * cobra.Command , args []string ) {
15+ fmt .Println ("All software has versions. This is coniksbot's:" )
16+ fmt .Println ("coniksbot v" + internal .Version )
17+ },
18+ }
19+
20+ func init () {
21+ RootCmd .AddCommand (versionCmd )
22+ }
Original file line number Diff line number Diff line change 1+ package cmd
2+
3+ import (
4+ "fmt"
5+
6+ "github.com/coniks-sys/coniks-go/internal"
7+ "github.com/spf13/cobra"
8+ )
9+
10+ var versionCmd = & cobra.Command {
11+ Use : "version" ,
12+ Short : "Print the version number of coniksclient." ,
13+ Long : `Print the version number of coniksclient.` ,
14+ Run : func (cmd * cobra.Command , args []string ) {
15+ fmt .Println ("All software has versions. This is coniksclient's:" )
16+ fmt .Println ("coniksclient v" + internal .Version )
17+ },
18+ }
19+
20+ func init () {
21+ RootCmd .AddCommand (versionCmd )
22+ }
Original file line number Diff line number Diff line change 1+ package internal
2+
3+ // Version of executables.
4+ var Version = "0.0.0+git"
Original file line number Diff line number Diff line change 1+ package cmd
2+
3+ import (
4+ "fmt"
5+
6+ "github.com/coniks-sys/coniks-go/internal"
7+ "github.com/spf13/cobra"
8+ )
9+
10+ var versionCmd = & cobra.Command {
11+ Use : "version" ,
12+ Short : "Print the version number of coniksserver." ,
13+ Long : `Print the version number of coniksserver.` ,
14+ Run : func (cmd * cobra.Command , args []string ) {
15+ fmt .Println ("All software has versions. This is coniksserver's:" )
16+ fmt .Println ("coniksserver v" + internal .Version )
17+ },
18+ }
19+
20+ func init () {
21+ RootCmd .AddCommand (versionCmd )
22+ }
You can’t perform that action at this time.
0 commit comments