-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
49 lines (45 loc) · 890 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
46
47
48
49
package main
import (
"log"
"os"
"github.com/urfave/cli"
)
func main() {
app := cli.NewApp()
app.Version = "0.8.1"
app.Usage = "grpc mocking server"
app.Flags = []cli.Flag{
cli.StringSliceFlag{
Name: "proto",
Required: true,
Usage: "proto files input directory",
},
cli.StringSliceFlag{
Name: "protoimports",
Required: false,
Usage: "additional directories to search for dependencies",
},
cli.StringFlag{
Name: "mocks",
Required: true,
Usage: "directory containing mocks in json format",
},
cli.StringFlag{
Name: "loglevel,l",
Required: false,
Value: "debug",
Usage: "log level",
},
cli.IntFlag{
Name: "port,p",
Required: false,
Usage: "grpc server port",
Value: 51000,
},
}
app.Action = newMockCmd()
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}