mirror of
https://github.com/sern-handler/cli
synced 2026-06-06 01:16:53 +00:00
feat: add init command, needs functionality
This commit is contained in:
16
cmd/cli/init.go
Normal file
16
cmd/cli/init.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var initCmd = &cobra.Command{
|
||||
Use: "init",
|
||||
Short: "Initialize a new Sern project.",
|
||||
Long: `Initialize a new Sern project, either with a JavaScript or a TypeScript template.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("Sern CLI - Init")
|
||||
},
|
||||
}
|
||||
@@ -20,6 +20,7 @@ func Execute() {
|
||||
rootCmd.Flags().BoolP("help", "h", false, "Help for the Sern CLI.")
|
||||
rootCmd.Flags().BoolP("version", "v", false, "The version of the Sern CLI.")
|
||||
rootCmd.SetVersionTemplate("Sern CLI - Version {{.Version}}\n")
|
||||
rootCmd.AddCommand(initCmd)
|
||||
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
Reference in New Issue
Block a user