Commit 49047cfb authored by Loïck Bonniot's avatar Loïck Bonniot

[client] Add client kernel

This adds `help` and `version` commands to the dfss client
TG-241 #ready
parent 35e6bc2d
Pipeline #121 passed with stage
......@@ -38,6 +38,7 @@ Code lint:
- golang
- lint
script:
- "go install ./..."
- "go get github.com/alecthomas/gometalinter"
- "go get gopkg.in/mgo.v2"
- "gometalinter --install"
......
package main
import (
"dfss"
"flag"
"fmt"
"runtime"
)
var (
verbose bool
)
func init() {
flag.BoolVar(&verbose, "v", false, "Print verbose messages")
flag.Usage = func() {
fmt.Println("DFSS client command line v" + dfss.Version)
fmt.Println("A tool to sign multiparty contracts")
fmt.Println("\nUsage:")
fmt.Println(" dfssc command [flags]")
fmt.Println("\nThe commands are:")
fmt.Println(" help print this help")
fmt.Println(" version print dfss client version")
fmt.Println("\nFlags:")
flag.PrintDefaults()
fmt.Println()
}
}
func main() {
flag.Parse()
command := flag.Arg(0)
switch command {
case "version":
fmt.Println("v"+dfss.Version, runtime.GOOS, runtime.GOARCH)
default:
flag.Usage()
}
}
package dfss
// Version represents the current version of the DFSS software suite
const Version = "0.0.1-dev"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment