-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
43 lines (33 loc) · 842 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
package main
import (
"os"
addcli "github.com/vinodsr/shell-butler/lib/cli/add"
"github.com/vinodsr/shell-butler/lib/cli/help"
"github.com/vinodsr/shell-butler/lib/runtime"
layout "github.com/vinodsr/shell-butler/lib/ui"
)
//Main program
func main() {
// Initialize the runtime
var rt *runtime.Runtime = runtime.GetRunTime()
rt.Init()
if len(os.Args) > 1 {
argCommand := os.Args[1]
if argCommand == "add" {
addcli.Execute()
os.Exit(1)
} else if argCommand == "help" || argCommand == "--help" {
help.Execute()
os.Exit(1)
}
}
// if len(rt.GetConfig().Commands) == 0 {
// fmt.Println("No commands to load. Please add commands.")
// os.Exit(1)
// }
//fmt.Printf("Data %+v\n", commands)
//fmt.Print(commands.Commands[0].Context)
// initialise the list datasource .
layout.Render()
//os.Exit(1)
}