mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:18:31 +02:00
feat(rules.on): support route directive
This commit is contained in:
@@ -30,6 +30,13 @@ func (t *Tuple[T1, T2]) String() string {
|
||||
return fmt.Sprintf("%v:%v", t.First, t.Second)
|
||||
}
|
||||
|
||||
func validateSingleArg(args []string) (any, gperr.Error) {
|
||||
if len(args) != 1 {
|
||||
return nil, ErrExpectOneArg
|
||||
}
|
||||
return args[0], nil
|
||||
}
|
||||
|
||||
// toStrTuple returns *StrTuple.
|
||||
func toStrTuple(args []string) (any, gperr.Error) {
|
||||
if len(args) != 2 {
|
||||
|
||||
Reference in New Issue
Block a user