-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
45 lines (41 loc) · 1016 Bytes
/
main.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
package main
import (
"fmt"
"github.com/urfave/cli"
"go-s2/diffplace"
"go-s2/g2s2"
"log"
"os"
)
func main() {
app := cli.NewApp()
app.Name = "go-s2"
app.Usage = "Spherical Geometry utility collections"
app.Version = "0.1"
app.Action = func(c *cli.Context) error {
fmt.Println("Try 'help'")
return nil
}
app.Commands = []cli.Command{
{
Name: "diffplace",
Usage: "Diff two S2ID files and move commonalities from first to the second file",
Action: func(c *cli.Context) error {
diffplace.Run(c)
return nil
},
},
{
Name: "g2s2",
Usage: "Convert geojson FeatureCollection to set of S2IDs",
Action: func(c *cli.Context) error {
err := g2s2.Run(c)
return err
},
},
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}