mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-14 21:44:53 +08:00
rename from cmd to weed for easier "go build"
This commit is contained in:
26
go/weed/version.go
Normal file
26
go/weed/version.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
const (
|
||||
VERSION = "0.28 beta"
|
||||
)
|
||||
|
||||
var cmdVersion = &Command{
|
||||
Run: runVersion,
|
||||
UsageLine: "version",
|
||||
Short: "print Weed File System version",
|
||||
Long: `Version prints the Weed File System version`,
|
||||
}
|
||||
|
||||
func runVersion(cmd *Command, args []string) bool {
|
||||
if len(args) != 0 {
|
||||
cmd.Usage()
|
||||
}
|
||||
|
||||
fmt.Printf("version %s %s %s\n", VERSION, runtime.GOOS, runtime.GOARCH)
|
||||
return true
|
||||
}
|
Reference in New Issue
Block a user