-
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathmain.go
57 lines (52 loc) · 1.63 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
51
52
53
54
55
56
57
package main
import (
"log"
"os"
discuitCLI "github.com/discuitnet/discuit/cli"
"github.com/discuitnet/discuit/cli/addalluserstocommunity"
"github.com/discuitnet/discuit/cli/admin"
"github.com/discuitnet/discuit/cli/deleteunusedcommunities"
"github.com/discuitnet/discuit/cli/deleteuser"
"github.com/discuitnet/discuit/cli/fixhotness"
"github.com/discuitnet/discuit/cli/forcepasschange"
"github.com/discuitnet/discuit/cli/hardreset"
"github.com/discuitnet/discuit/cli/injectconfig"
"github.com/discuitnet/discuit/cli/migrate"
"github.com/discuitnet/discuit/cli/mod"
"github.com/discuitnet/discuit/cli/newbadge"
"github.com/discuitnet/discuit/cli/populatepost"
"github.com/discuitnet/discuit/cli/serve"
"github.com/urfave/cli/v2"
_ "github.com/golang-migrate/migrate/v4/database/mysql"
_ "github.com/golang-migrate/migrate/v4/source/file"
)
func main() {
app := &cli.App{
Name: "discuit",
Usage: "A free and open-source community discussion platform.",
Description: "A free and open-source community discussion platform.",
EnableBashCompletion: true,
Suggest: true,
Before: discuitCLI.Before,
Commands: []*cli.Command{
migrate.Command,
serve.Command,
admin.Command,
mod.Command,
hardreset.Command,
populatepost.Command,
forcepasschange.Command,
fixhotness.Command,
addalluserstocommunity.Command,
deleteunusedcommunities.Command,
newbadge.Command,
deleteuser.Command,
injectconfig.Command,
},
DefaultCommand: "serve",
After: discuitCLI.After,
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}