2 Star 3 Fork 10

王布衣 / engine

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
command_rules.go 738 Bytes
Copy Edit Raw Blame History
王布衣 authored 2023-12-16 09:34 . 移除时间戳格式
package command
import (
"gitee.com/quant1x/engine/rules"
cmder "github.com/spf13/cobra"
)
// CmdRules 规则
var CmdRules = &cmder.Command{
Use: "rules",
Short: "规则",
Args: func(cmd *cmder.Command, args []string) error {
return nil
},
//ValidArgsFunction: func(cmd *cmder.Command, args []string, toComplete string) ([]string, cmder.ShellCompDirective) {
//
//},
PreRun: func(cmd *cmder.Command, args []string) {
},
Run: func(cmd *cmder.Command, args []string) {
rules.PrintRuleList()
},
}
func initRules() {
//CmdRules.SetFlagErrorFunc(func(cmd *cmder.Command, err error) error {
// args := os.Args[1:]
// cmd_, flags, err := cmd.Parent().Find(args)
// fmt.Println(cmd_, flags, err)
// return nil
//})
}
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
v1.8.4

Search