Add cobra to manage CLI
This commit is contained in:
parent
6b9f1e9d33
commit
9ee0e693d1
8
glide.lock
generated
8
glide.lock
generated
@ -1,4 +1,6 @@
|
||||
hash: f20acabeeefc7aca1d734affdc78bd5c5562f23221d3e220740a88b89bbab663
|
||||
updated: 2016-11-24T18:16:11.117241701+01:00
|
||||
imports: []
|
||||
hash: 286cb8b51363e6246106ae7f010d08a680e675323e43dfa6c1f9988638ab612a
|
||||
updated: 2016-11-24T18:24:43.661118911+01:00
|
||||
imports:
|
||||
- name: github.com/spf13/cobra
|
||||
version: 9495bc009a56819bdb0ddbc1a373e29c140bc674
|
||||
testImports: []
|
||||
|
@ -5,3 +5,4 @@ owners:
|
||||
email: jip@dekker.li
|
||||
homepage: https://jip.dekker.li/
|
||||
import:
|
||||
- package: github.com/spf13/cobra
|
||||
|
20
main.go
20
main.go
@ -1,5 +1,23 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "chonozinc [description]",
|
||||
Short: "Test and time your minizinc models!",
|
||||
Long: `ChonoZinc is a small tool that wraps around mzn-fzn. It main purpose is to
|
||||
test MiniZinc models using different solvers. It run your your model on all or
|
||||
a sub-set of declared solvers and report on the statistics gathered. The data
|
||||
gathered is saved in every stage.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {},
|
||||
}
|
||||
|
||||
func main() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
os.Exit(-1)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user