-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
46 lines (43 loc) · 924 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
package main
import (
"log"
"os"
"github.com/dominikus1993/xbox-promotion-checker-bot/cmd"
"github.com/urfave/cli/v2"
_ "go.uber.org/automaxprocs"
)
func main() {
app := &cli.App{
Name: "xbox-promotion-bot",
Usage: "parse xbox game promotions",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "webhooktoken",
Usage: "discord webhook token",
Required: true,
},
&cli.StringFlag{
Name: "webhookid",
Usage: "discord webhhook id",
Required: true,
},
&cli.Float64Flag{
Name: "pricePromotionPercentage",
Aliases: []string{"ppp"},
Usage: "minimum promotion percentage",
Value: 50,
Required: false,
},
&cli.StringFlag{
Name: "mongo-connection",
Usage: "mongodb connection string",
Required: true,
},
},
Action: cmd.XboxGamePromotionParser,
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}