You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 rivejä
409 B
26 rivejä
409 B
4 vuotta sitten
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"github.com/spf13/cobra"
|
||
|
"github.com/ztino/jd_seckill/common"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
var rootCmd = &cobra.Command{
|
||
|
Use: common.SoftName,
|
||
|
Short: "jd_seckill is a Jingdong Moutai seckill script",
|
||
|
Run: func(cmd *cobra.Command, args []string) {
|
||
|
if len(args) == 0 {
|
||
|
_=cmd.Help()
|
||
|
}
|
||
|
},
|
||
|
}
|
||
|
|
||
|
func Execute() {
|
||
|
if err := rootCmd.Execute(); err != nil {
|
||
|
fmt.Println(err)
|
||
|
os.Exit(1)
|
||
|
}
|
||
|
}
|