-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
50 lines (44 loc) · 1.01 KB
/
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
50
package main
import (
"fmt"
"log"
"os"
"github.com/urfave/cli/v2"
"github.com/AH-dark/epay-cli/actions/implements/mapi"
"github.com/AH-dark/epay-cli/actions/implements/migrate"
"github.com/AH-dark/epay-cli/actions/implements/submit"
)
var (
version = "dev"
commit string
date string
)
func main() {
app := &cli.App{
Name: "epay-cli",
Description: "A command line tool for epay.",
Usage: "epay-cli is a command line tool for epay",
Version: fmt.Sprintf("%s-%s", version, commit),
Copyright: "2022-2023 @AHdark All rights reserved.",
Authors: []*cli.Author{
{Name: "AHdark", Email: "ahdark@outlook.com"},
},
Metadata: map[string]interface{}{
"date": date,
},
Commands: []*cli.Command{
migrate.NewService().Command(),
{
Name: "test",
Usage: "test epay",
Subcommands: []*cli.Command{
submit.NewService().Command(),
mapi.NewService().Command(),
},
},
},
}
if err := app.Run(os.Args); err != nil {
log.Fatal("error: ", err)
}
}