Add version command
This commit is contained in:
parent
c9e4d9af80
commit
0fac4a3c14
@ -26,8 +26,11 @@ func init() {
|
||||
RegisterCommand(NewCmdSetWhite())
|
||||
RegisterCommand(NewCmdShow())
|
||||
RegisterCommand(NewCmdToggle())
|
||||
RegisterCommand(NewCmdVersion())
|
||||
}
|
||||
|
||||
const Version = "0.1.0-pre"
|
||||
|
||||
const lumercFile string = ".lumerc"
|
||||
|
||||
func Main(args []string) (int, error) {
|
||||
|
@ -1,3 +1,20 @@
|
||||
package lumecmd
|
||||
|
||||
const Version = "0.1.0-pre"
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func NewCmdVersion() Command {
|
||||
return Command{
|
||||
Name: "version",
|
||||
Func: VersionCmd,
|
||||
Flags: nil,
|
||||
Use: "",
|
||||
Short: "Show version",
|
||||
}
|
||||
}
|
||||
|
||||
func VersionCmd(args CmdArgs) (int, error) {
|
||||
fmt.Println(Version)
|
||||
return ExitSuccess, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user