-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcommands.go
More file actions
39 lines (34 loc) · 786 Bytes
/
commands.go
File metadata and controls
39 lines (34 loc) · 786 Bytes
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
34
35
36
37
38
39
package main
import (
"fmt"
"os"
"github.com/codegangsta/cli"
"github.com/mpon/xgodeproj/command"
)
// GlobalFlags that uses cli flags
var GlobalFlags = []cli.Flag{}
// Commands have command list
var Commands = []cli.Command{
{
Name: "show",
Usage: "Prints section names or each section information",
Action: command.CmdShow,
Flags: []cli.Flag{
cli.StringFlag{
Name: "section",
Value: "",
Usage: "section name for pbxproj",
},
cli.StringFlag{
Name: "project",
Value: "",
Usage: "xcode project name",
},
},
},
}
// CommandNotFound error
func CommandNotFound(c *cli.Context, command string) {
fmt.Fprintf(os.Stderr, "%s: '%s' is not a %s command. See '%s --help'.", c.App.Name, command, c.App.Name, c.App.Name)
os.Exit(2)
}