Commit d9082bcd authored by Tristan Claverie's avatar Tristan Claverie
Browse files

Merge branch '174_kernels' into 'master'

174 kernels

This is a very simple approach to CLI applications.
No dependency required; but there is some duplicated code. Not a problem.

To test it, just follow updated README tutorial.

See merge request !6
parents 35e6bc2d e9fbdff6
Pipeline #128 passed with stage
......@@ -14,6 +14,7 @@ Unit tests:
# paths:
# - "coverage.html"
script:
- "ln -s $(pwd) $GOPATH/src/dfss"
- "go get gopkg.in/mgo.v2"
- "go test -coverprofile auth.part -v ./auth"
- "go test -coverprofile mgdb.part -v ./mgdb"
......@@ -38,7 +39,9 @@ Code lint:
- golang
- lint
script:
- "ln -s $(pwd) $GOPATH/src/dfss"
- "go get github.com/alecthomas/gometalinter"
- "go get gopkg.in/mgo.v2"
- "go install ./..."
- "gometalinter --install"
- "gometalinter -t --deadline=100s -j1 ./..."
......@@ -18,3 +18,11 @@ Configure workspace
go install dfss/...
```
Run dfss modules
----------------
```bash
dfssc help # Client
dfssp help # Plaform
dfssd help # Demonstrator
```
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 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 demonstrator v" + dfss.Version)
fmt.Println("Debug tool to check remote transmissions")
fmt.Println("\nUsage:")
fmt.Println(" dfssd 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 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 platform v" + dfss.Version)
fmt.Println("Users and contracts manager")
fmt.Println("\nUsage:")
fmt.Println(" dfssp 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"
Supports Markdown
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