Add version information
This commit is contained in:
parent
d883e3d92d
commit
393eb31c3c
2
api.go
2
api.go
@ -1,5 +1,7 @@
|
||||
package asink
|
||||
|
||||
const API_VERSION_STRING = "0.1"
|
||||
|
||||
type APIStatus uint32
|
||||
|
||||
const (
|
||||
|
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"asink"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
@ -22,6 +23,11 @@ var commands []Command = []Command{
|
||||
fn: StopClient,
|
||||
explanation: "Stop the client daemon",
|
||||
},
|
||||
Command{
|
||||
cmd: "version",
|
||||
fn: PrintVersion,
|
||||
explanation: "Display the current version",
|
||||
},
|
||||
/* Command{
|
||||
cmd: "status",
|
||||
fn: GetStatus,
|
||||
@ -47,3 +53,7 @@ func main() {
|
||||
fmt.Printf("\t%s\t\t%s\n", c.cmd, c.explanation)
|
||||
}
|
||||
}
|
||||
|
||||
func PrintVersion(args []string) {
|
||||
fmt.Println("Asink client version " + asink.VERSION_STRING + ", using version " + asink.API_VERSION_STRING + " of the Asink API.")
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"asink"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
@ -37,6 +38,11 @@ var commands []Command = []Command{
|
||||
fn: UserMod,
|
||||
explanation: "Modify a user",
|
||||
},
|
||||
Command{
|
||||
cmd: "version",
|
||||
fn: PrintVersion,
|
||||
explanation: "Display the current version",
|
||||
},
|
||||
}
|
||||
|
||||
func main() {
|
||||
@ -56,3 +62,7 @@ func main() {
|
||||
fmt.Printf("\t%s\t\t%s\n", c.cmd, c.explanation)
|
||||
}
|
||||
}
|
||||
|
||||
func PrintVersion(args []string) {
|
||||
fmt.Println("Asink server version " + asink.VERSION_STRING + ", using version " + asink.API_VERSION_STRING + " of the Asink API.")
|
||||
}
|
||||
|
3
version.go
Normal file
3
version.go
Normal file
@ -0,0 +1,3 @@
|
||||
package asink
|
||||
|
||||
const VERSION_STRING = "0.1"
|
Loading…
Reference in New Issue
Block a user