mirror of
https://github.com/foomo/fender.git
synced 2026-06-28 22:00:03 +00:00
20 lines
396 B
Go
20 lines
396 B
Go
package fend
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/foomo/fender/rule"
|
|
)
|
|
|
|
func DynamicField(path string, rules ...rule.DynamicRule) Fend {
|
|
return func(ctx context.Context, mode Mode) error {
|
|
return fendDynamic(ctx, mode, path, rules...)
|
|
}
|
|
}
|
|
|
|
func DynamicVar(rules ...rule.DynamicRule) Fend {
|
|
return func(ctx context.Context, mode Mode) error {
|
|
return fendDynamic(ctx, mode, "", rules...)
|
|
}
|
|
}
|