yufan.me/tools/cmd/root.go

21 lines
316 B
Go
Raw Normal View History

2024-06-14 02:11:26 +08:00
package cmd
import (
"os"
"github.com/spf13/cobra"
2024-06-14 02:11:26 +08:00
)
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "tools",
Short: "A set of useful tools for writing in weblog",
}
func Execute() {
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}