-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
39 lines (37 loc) · 912 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
package main
import (
"github.com/gookit/color"
"github.com/rahultripathidev/docker-utility/config"
"github.com/rahultripathidev/docker-utility/datastore/bitcask"
"github.com/rahultripathidev/docker-utility/kong"
"github.com/rahultripathidev/docker-utility/service"
"github.com/urfave/cli/v2"
"os"
)
func main() {
err := config.LoadConfig.Bit()
if err != nil {
panic(err)
}
bitcask.InitClient()
err = config.LoadConfig.RegistryAuth()
if err != nil {
panic(err)
}
defer func() {
err = bitcask.BitClient.Flock.Unlock()
bitcask.GracefulClose()
}()
var commands []*cli.Command
commands = append(commands, service.ServiceCommands...)
commands = append(commands, kong.KongCommands)
app := &cli.App{
Name: "Xerxes",
Usage: "🛳️ A \"simple\" container orchestration service ",
Commands: commands,
}
err = app.Run(os.Args)
if err != nil {
color.Error.Println(err)
}
}