2012-08-06 23:54:53 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"runtime"
|
2014-10-26 18:34:55 +00:00
|
|
|
|
2015-04-16 19:18:06 +00:00
|
|
|
"github.com/chrislusf/seaweedfs/go/util"
|
2012-08-06 23:54:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var cmdVersion = &Command{
|
|
|
|
Run: runVersion,
|
|
|
|
UsageLine: "version",
|
2014-09-21 04:18:26 +00:00
|
|
|
Short: "print Seaweed File System version",
|
|
|
|
Long: `Version prints the Seaweed File System version`,
|
2012-08-06 23:54:53 +00:00
|
|
|
}
|
|
|
|
|
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()
|
|
|
|
}
|
|
|
|
|
2014-03-25 20:46:59 +00:00
|
|
|
fmt.Printf("version %s %s %s\n", util.VERSION, runtime.GOOS, runtime.GOARCH)
|
2012-08-07 01:20:26 +00:00
|
|
|
return true
|
2012-08-06 23:54:53 +00:00
|
|
|
}
|