1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-10-16 11:13:21 +08:00
Files
kubo/cmd/ipfs/version.go
Brian Tiger Chow 7968b45e58 vendor dependencies with godep
dependencies are vendored into Godeps/_workspace and commit versions are
recorded in Godeps.json

update datastore to e89f0511
update go.crypto
2014-09-09 22:39:42 -07:00

33 lines
707 B
Go

package main
import (
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
u "github.com/jbenet/go-ipfs/util"
)
// The IPFS version.
const Version = "0.1.0"
var cmdIpfsVersion = &commander.Command{
UsageLine: "version",
Short: "Show ipfs version information.",
Long: `ipfs version - Show ipfs version information.
Returns the current version of ipfs and exits.
`,
Run: versionCmd,
}
func init() {
cmdIpfsVersion.Flag.Bool("number", false, "show only the number")
}
func versionCmd(c *commander.Command, _ []string) error {
number := c.Flag.Lookup("number").Value.Get().(bool)
if !number {
u.POut("ipfs version ")
}
u.POut("%s\n", Version)
return nil
}