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.

26 lines
434 B

  1. package main
  2. import (
  3. "fmt"
  4. "runtime"
  5. )
  6. const (
  7. VERSION = "0.48"
  8. )
  9. var cmdVersion = &Command{
  10. Run: runVersion,
  11. UsageLine: "version",
  12. Short: "print Weed File System version",
  13. Long: `Version prints the Weed File System version`,
  14. }
  15. func runVersion(cmd *Command, args []string) bool {
  16. if len(args) != 0 {
  17. cmd.Usage()
  18. }
  19. fmt.Printf("version %s %s %s\n", VERSION, runtime.GOOS, runtime.GOARCH)
  20. return true
  21. }