Add version information

This commit is contained in:
2013-09-04 21:29:53 -04:00
parent d883e3d92d
commit 393eb31c3c
4 changed files with 25 additions and 0 deletions

View File

@ -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.")
}