mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-04 16:12:47 +08:00
31 lines
409 B
Go
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(),
|
|
)
|
|
}
|