You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
446 B

  1. package command
  2. import (
  3. "fmt"
  4. "runtime"
  5. "github.com/chrislusf/seaweedfs/weed/util"
  6. )
  7. var cmdVersion = &Command{
  8. Run: runVersion,
  9. UsageLine: "version",
  10. Short: "print SeaweedFS version",
  11. Long: `Version prints the SeaweedFS version`,
  12. }
  13. func runVersion(cmd *Command, args []string) bool {
  14. if len(args) != 0 {
  15. cmd.Usage()
  16. }
  17. fmt.Printf("version %s %s %s\n", util.Version(), runtime.GOOS, runtime.GOARCH)
  18. return true
  19. }