mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-05-10 17:52:44 +08:00
26 lines
361 B
Go
26 lines
361 B
Go
package cmd
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/krau/SaveAny-Bot/config"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var rootCmd = &cobra.Command{
|
|
Use: "saveany-bot",
|
|
Short: "saveany-bot",
|
|
Run: Run,
|
|
}
|
|
|
|
func init() {
|
|
config.RegisterFlags(rootCmd)
|
|
}
|
|
|
|
func Execute(ctx context.Context) {
|
|
if err := rootCmd.ExecuteContext(ctx); err != nil {
|
|
fmt.Println(err)
|
|
}
|
|
}
|