1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Init toolkit CLI

This commit is contained in:
stefanprodan
2020-04-24 14:30:27 +03:00
parent ebdabaf98d
commit c8fdf76084
5 changed files with 355 additions and 0 deletions

29
cmd/tk/main.go Normal file
View File

@@ -0,0 +1,29 @@
package main
import (
"fmt"
"log"
"os"
"strings"
"github.com/spf13/cobra"
)
var VERSION = "0.0.1"
var rootCmd = &cobra.Command{
Use: "tk",
Short: "Kubernetes CD assembler",
Version: VERSION,
}
func main() {
log.SetFlags(0)
rootCmd.SetArgs(os.Args[1:])
if err := rootCmd.Execute(); err != nil {
e := err.Error()
fmt.Println(strings.ToUpper(e[:1]) + e[1:])
os.Exit(1)
}
}