Debian Codegraph @

execution/func_type_of.go

raw symbols SCIP
1 package execution
2
3 import (
4 "context"
5 "github.com/tomwright/dasel/v3/model"
6 )
7
8 // FuncTypeOf is a function that returns the type of the first argument as a string.
9 var FuncTypeOf = NewFunc(
10 "typeOf",
11 func(ctx context.Context, data *model.Value, args model.Values) (*model.Value, error) {
12 return model.NewStringValue(args[0].Type().String()), nil
13 },
14 ValidateArgsExactly(1),
15 )