2012-08-07 07:54:53 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2014-03-26 04:46:59 +08:00
|
|
|
"code.google.com/p/weed-fs/go/util"
|
2012-08-07 07:54:53 +08:00
|
|
|
"fmt"
|
|
|
|
"runtime"
|
|
|
|
)
|
|
|
|
|
|
|
|
var cmdVersion = &Command{
|
|
|
|
Run: runVersion,
|
|
|
|
UsageLine: "version",
|
|
|
|
Short: "print Weed File System version",
|
|
|
|
Long: `Version prints the Weed File System version`,
|
|
|
|
}
|
|
|
|
|
2012-09-24 17:01:53 +08:00
|
|
|
func runVersion(cmd *Command, args []string) bool {
|
2012-08-07 07:54:53 +08:00
|
|
|
if len(args) != 0 {
|
|
|
|
cmd.Usage()
|
|
|
|
}
|
|
|
|
|
2014-03-26 04:46:59 +08:00
|
|
|
fmt.Printf("version %s %s %s\n", util.VERSION, runtime.GOOS, runtime.GOARCH)
|
2012-08-07 09:20:26 +08:00
|
|
|
return true
|
2012-08-07 07:54:53 +08:00
|
|
|
}
|