forked from alexellis/arkade
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
38 lines (29 loc) · 778 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
// Copyright (c) arkade author(s) 2020. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
package main
import (
"os"
"github.com/alexellis/arkade/cmd"
"github.com/spf13/cobra"
)
func main() {
cmdVersion := cmd.MakeVersion()
cmdInstall := cmd.MakeInstall()
cmdInfo := cmd.MakeInfo()
cmdUpdate := cmd.MakeUpdate()
printarkadeASCIIArt := cmd.PrintArkadeASCIIArt
var rootCmd = &cobra.Command{
Use: "arkade",
Run: func(cmd *cobra.Command, args []string) {
printarkadeASCIIArt()
cmd.Help()
},
}
rootCmd.AddCommand(cmdInstall)
rootCmd.AddCommand(cmdVersion)
rootCmd.AddCommand(cmdInfo)
rootCmd.AddCommand(cmdUpdate)
if err := rootCmd.Execute(); err != nil {
os.Exit(1)
}
}