2012-08-07 07:54:53 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"runtime"
|
2014-10-27 02:34:55 +08:00
|
|
|
|
2014-12-14 16:20:21 +08:00
|
|
|
"github.com/mcqueenorama/weed-fs/go/util"
|
2012-08-07 07:54:53 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
var cmdVersion = &Command{
|
|
|
|
Run: runVersion,
|
|
|
|
UsageLine: "version",
|
2014-09-21 12:18:26 +08:00
|
|
|
Short: "print Seaweed File System version",
|
|
|
|
Long: `Version prints the Seaweed File System version`,
|
2012-08-07 07:54:53 +08:00
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|