moving to go style commands

git-svn-id: https://weed-fs.googlecode.com/svn/trunk@62 282b0af5-e82d-9cf1-ede4-77906d7719d0
This commit is contained in:
chris.lu@gmail.com
2012-08-06 23:54:53 +00:00
parent c627942691
commit 51860424a6
3 changed files with 268 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"runtime"
)
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) {
if len(args) != 0 {
cmd.Usage()
}
fmt.Printf("version 0.15 %s %s\n",runtime.GOOS, runtime.GOARCH)
}