File: main.go

package info (click to toggle)
golang-github-smira-commander 0.0~git20140515.f408b00-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, buster-backports
  • size: 116 kB
  • sloc: makefile: 3
file content (33 lines) | stat: -rw-r--r-- 417 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main

import (
	"fmt"
	"os"

	"github.com/gonuts/commander"
)

var g_cmd = &commander.Command{
	UsageLine: os.Args[0] + " does cool things",
}

func init() {
	g_cmd.Subcommands = []*commander.Command{
		cmd_cmd1,
		ex_make_cmd_cmd2(),
		cmd_subcmd1,
		ex_make_cmd_subcmd2(),
	}
}

func main() {
	err := g_cmd.Dispatch(os.Args[1:])
	if err != nil {
		fmt.Printf("%v\n", err)
		os.Exit(1)
	}

	return
}

// EOF