remove deprecated dsl helper func

This commit is contained in:
Ramana Reddy 2023-08-07 23:50:16 +05:30
parent ef8ef8edb3
commit 237cb0bc79

View File

@ -19,10 +19,10 @@ var (
) )
func init() { func init() {
_ = dsl.AddMultiSignatureHelperFunction("resolve", []string{ _ = dsl.AddFunction(dsl.NewWithMultipleSignatures("resolve", []string{
"(host string) string", "(host string) string",
"(format string) string", "(format string) string",
}, func(args ...interface{}) (interface{}, error) { }, false, func(args ...interface{}) (interface{}, error) {
argCount := len(args) argCount := len(args)
if argCount == 0 || argCount > 2 { if argCount == 0 || argCount > 2 {
return nil, dsl.ErrInvalidDslFunction return nil, dsl.ErrInvalidDslFunction
@ -94,7 +94,7 @@ func init() {
} }
return "", fmt.Errorf("no records found") return "", fmt.Errorf("no records found")
}) }))
dsl.PrintDebugCallback = func(args ...interface{}) error { dsl.PrintDebugCallback = func(args ...interface{}) error {
gologger.Info().Msgf("print_debug value: %s", fmt.Sprint(args)) gologger.Info().Msgf("print_debug value: %s", fmt.Sprint(args))