-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.go
61 lines (54 loc) · 1.06 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
58
59
60
61
package main
import (
"log"
"os"
"github.com/urfave/cli/v2"
)
// TODO: pls refactor all of this mess
func runCli() error {
app := &cli.App{
Name: "um",
Usage: "manage an Ultramarine Linux system",
Commands: []*cli.Command{
{
Name: "status",
Usage: "display the status of the system",
Action: status,
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "upload",
Usage: "Upload status to boba",
},
&cli.BoolFlag{
Name: "json",
Usage: "Output system status in JSON",
},
},
},
// {
// Name: "experiments",
// Usage: "manage Ultramarine Linux experiments, a preview of features to come",
// Action: listExperiments,
// Subcommands: []*cli.Command{
// {
// Name: "enable",
// Action: enableExperiment,
// },
// {
// Name: "disable",
// Action: disableExperiment,
// },
// },
// },
},
}
if err := app.Run(os.Args); err != nil {
return err
}
return nil
}
func main() {
if err := runCli(); err != nil {
log.Fatal(err)
}
}