-
Notifications
You must be signed in to change notification settings - Fork 15
/
main.go
49 lines (42 loc) · 870 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
package main
import (
"fmt"
"os"
"runtime"
"github.com/mrjosh/helm-ls/cmds"
"github.com/mrjosh/helm-ls/internal/version"
"github.com/spf13/cobra"
)
var (
BranchName string
Version string
GitCommit string
CompiledBy string
BuildTime string
)
func main() {
rootCmd := &cobra.Command{
Use: "helm_ls",
Long: `
/\ /\___| |_ __ ___ / / ___
/ /_/ / _ \ | '_ ' _ \ / / / __|
/ __ / __/ | | | | | / /__\__ \
\/ /_/ \___|_|_| |_| |_\____/___/`,
RunE: func(cmd *cobra.Command, _ []string) error {
return cmd.Help()
},
}
rootCmd.SetArgs(os.Args[1:])
vi := &version.BuildInfo{
Version: Version,
Branch: BranchName,
GitCommit: GitCommit,
CompiledBy: CompiledBy,
GoVersion: runtime.Version(),
BuildTime: BuildTime,
}
if err := cmds.Start(vi, rootCmd); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}