Files
LeetCode-Go/ctl/command.go
2021-01-18 11:06:37 +08:00

31 lines
409 B
Go

package main
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "leetcode-go",
Short: "A simple command line client for leetcode-go.",
}
func execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(-1)
}
}
func init() {
rootCmd.AddCommand(
versionCmd,
newBuildCommand(),
newLabelCommand(),
newPDFCommand(),
newRefresh(),
)
}