-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcli.go
59 lines (52 loc) · 1.09 KB
/
cli.go
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Diglet is a set of geospatial tools focused around rendering large feature sets efficiently.
package main
import (
"os"
//"github.com/buckhx/diglet/dig"
"github.com/buckhx/diglet/mbt"
"github.com/buckhx/diglet/tms"
"github.com/buckhx/diglet/util"
"github.com/codegangsta/cli"
"github.com/davecheney/profile"
)
var Version string
//go:generate go run scripts/include.go static/static.html
func client(args []string) {
app := cli.NewApp()
app.Name = "diglet"
app.Usage = "Your friend in the tile business"
app.Version = Version
app.Commands = []cli.Command{
tms.Cmd,
mbt.Cmd,
}
app.Flags = []cli.Flag{
cli.BoolFlag{
Name: "debug",
Usage: "Print debugging log lines",
},
}
app.Run(args)
}
func main() {
for _, arg := range os.Args {
if arg == "--debug" {
util.DEBUG = true
config := &profile.Config{
MemProfile: true,
CPUProfile: true,
}
defer profile.Start(config).Stop()
}
}
client(os.Args)
}
/*
Go! Diglet!
Diglet used Earthquake
Foe DEWGONG fainted
Diglet gain 1960 EXP. Points
ELITE FOUR LORELEI is about to use CLOYSTER
sent out
Diglet fainted!
*/