🎉 start the project
This commit is contained in:
22
internal/cmd/cmd.go
Normal file
22
internal/cmd/cmd.go
Normal file
@ -0,0 +1,22 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
root *cobra.Command
|
||||
)
|
||||
|
||||
func Init(ctx context.Context) {
|
||||
root = rootCmd()
|
||||
}
|
||||
|
||||
func Execute(ctx context.Context) {
|
||||
if err := root.ExecuteContext(ctx); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user