2012-08-06 23:54:53 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"runtime"
|
|
|
|
)
|
|
|
|
|
2012-09-24 09:01:53 +00:00
|
|
|
const (
|
2012-09-24 09:02:42 +00:00
|
|
|
VERSION = "0.19"
|
2012-09-24 09:01:53 +00:00
|
|
|
)
|
|
|
|
|
2012-08-06 23:54:53 +00:00
|
|
|
var cmdVersion = &Command{
|
|
|
|
Run: runVersion,
|
|
|
|
UsageLine: "version",
|
|
|
|
Short: "print Weed File System version",
|
|
|
|
Long: `Version prints the Weed File System version`,
|
|
|
|
}
|
|
|
|
|
2012-09-24 09:01:53 +00:00
|
|
|
func runVersion(cmd *Command, args []string) bool {
|
2012-08-06 23:54:53 +00:00
|
|
|
if len(args) != 0 {
|
|
|
|
cmd.Usage()
|
|
|
|
}
|
|
|
|
|
2012-09-24 09:01:53 +00:00
|
|
|
fmt.Printf("version %s %s %s\n", VERSION, runtime.GOOS, runtime.GOARCH)
|
2012-08-07 01:20:26 +00:00
|
|
|
return true
|
2012-08-06 23:54:53 +00:00
|
|
|
}
|