feat: initial commit

This commit is contained in:
2025-02-11 12:07:24 +01:00
parent 4f8bd11858
commit de07752466
10 changed files with 121 additions and 1 deletions

24
cmd/root.go Normal file
View File

@@ -0,0 +1,24 @@
package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "flotte",
Short: "Short",
Long: `Long`,
Run: func(cmd *cobra.Command, args []string) {
cmd.Help()
},
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}

20
cmd/version.go Normal file
View File

@@ -0,0 +1,20 @@
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of flotte",
Long: `All software has versions. This is flotte's`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("flotte v0.9 -- HEAD")
},
}