mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-14 07:46:51 +00:00
Init toolkit CLI
This commit is contained in:
parent
ebdabaf98d
commit
c8fdf76084
5 changed files with 355 additions and 0 deletions
29
cmd/tk/main.go
Normal file
29
cmd/tk/main.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue