-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
51 lines (43 loc) · 911 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
50
51
// Copyright (c) 2022 iwaltgen
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
package main
import (
"log"
"os"
"github.com/urfave/cli/v2"
"github.com/iwaltgen/sak/cmd/sak/len"
"github.com/iwaltgen/sak/cmd/sak/rand"
"github.com/iwaltgen/sak/cmd/sak/uuid"
"github.com/iwaltgen/sak/internal"
)
func main() {
app := &cli.App{
Name: "sak",
Usage: "Multi-tool CLI",
Version: internal.Version(),
Compiled: internal.BuildDate(),
Authors: []*cli.Author{
{
Name: "iwaltgen",
Email: "iwaltgen@gmail.com",
},
},
Suggest: true,
UseShortOptionHandling: true,
EnableBashCompletion: true,
Before: func(ctx *cli.Context) error {
log.SetFlags(0)
return nil
},
Commands: []*cli.Command{
len.Cmd,
rand.Cmd,
uuid.Cmd,
},
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}