-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/coniks-sys/coniks-go/internal" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var versionCmd = &cobra.Command{ | ||
Use: "version", | ||
Short: "Print the version number of coniksbot.", | ||
Long: `Print the version number of coniksbot.`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
fmt.Println("All software has versions. This is coniksbot's:") | ||
fmt.Println("coniksbot v" + internal.Version) | ||
}, | ||
} | ||
|
||
func init() { | ||
RootCmd.AddCommand(versionCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/coniks-sys/coniks-go/internal" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var versionCmd = &cobra.Command{ | ||
Use: "version", | ||
Short: "Print the version number of coniksclient.", | ||
Long: `Print the version number of coniksclient.`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
fmt.Println("All software has versions. This is coniksclient's:") | ||
fmt.Println("coniksclient v" + internal.Version) | ||
}, | ||
} | ||
|
||
func init() { | ||
RootCmd.AddCommand(versionCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package internal | ||
|
||
// Version of executables. | ||
var Version = "0.0.0+git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/coniks-sys/coniks-go/internal" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var versionCmd = &cobra.Command{ | ||
Use: "version", | ||
Short: "Print the version number of coniksserver.", | ||
Long: `Print the version number of coniksserver.`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
fmt.Println("All software has versions. This is coniksserver's:") | ||
fmt.Println("coniksserver v" + internal.Version) | ||
}, | ||
} | ||
|
||
func init() { | ||
RootCmd.AddCommand(versionCmd) | ||
} |