seaweedfs/weed/command/version.go

24 lines
456 B
Go
Raw Normal View History

package command
import (
"fmt"
2025-06-04 13:46:07 +08:00
"github.com/seaweedfs/seaweedfs/weed/util/version"
"runtime"
)
var cmdVersion = &Command{
Run: runVersion,
UsageLine: "version",
Short: "print SeaweedFS version",
Long: `Version prints the SeaweedFS version`,
}
func runVersion(cmd *Command, args []string) bool {
if len(args) != 0 {
cmd.Usage()
}
2025-06-04 13:46:07 +08:00
fmt.Printf("version %s %s %s\n", version.Version(), runtime.GOOS, runtime.GOARCH)
return true
}