@@ -644,11 +644,11 @@ var Builtins = []*Function{
|
644 | 644 | if len(args) != 2 {
|
645 | 645 | return nil, fmt.Errorf("invalid number of arguments (expected 2, got %d)", len(args))
|
646 | 646 | }
|
647 |
| -v := deref.ValueOf(args[0]) |
| 647 | +v := reflect.ValueOf(args[0]) |
648 | 648 | if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
|
649 | 649 | return nil, fmt.Errorf("cannot take from %s", v.Kind())
|
650 | 650 | }
|
651 |
| -n := deref.ValueOf(args[1]) |
| 651 | +n := reflect.ValueOf(args[1]) |
652 | 652 | if !n.CanInt() {
|
653 | 653 | return nil, fmt.Errorf("cannot take %s elements", n.Kind())
|
654 | 654 | }
|
@@ -683,7 +683,7 @@ var Builtins = []*Function{
|
683 | 683 | if len(args) != 1 {
|
684 | 684 | return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args))
|
685 | 685 | }
|
686 |
| -v := deref.ValueOf(args[0]) |
| 686 | +v := reflect.ValueOf(args[0]) |
687 | 687 | if v.Kind() != reflect.Map {
|
688 | 688 | return nil, fmt.Errorf("cannot get keys from %s", v.Kind())
|
689 | 689 | }
|
@@ -713,7 +713,7 @@ var Builtins = []*Function{
|
713 | 713 | if len(args) != 1 {
|
714 | 714 | return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args))
|
715 | 715 | }
|
716 |
| -v := deref.ValueOf(args[0]) |
| 716 | +v := reflect.ValueOf(args[0]) |
717 | 717 | if v.Kind() != reflect.Map {
|
718 | 718 | return nil, fmt.Errorf("cannot get values from %s", v.Kind())
|
719 | 719 | }
|
@@ -743,7 +743,7 @@ var Builtins = []*Function{
|
743 | 743 | if len(args) != 1 {
|
744 | 744 | return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args))
|
745 | 745 | }
|
746 |
| -v := deref.ValueOf(args[0]) |
| 746 | +v := reflect.ValueOf(args[0]) |
747 | 747 | if v.Kind() != reflect.Map {
|
748 | 748 | return nil, fmt.Errorf("cannot transform %s to pairs", v.Kind())
|
749 | 749 | }
|
@@ -771,7 +771,7 @@ var Builtins = []*Function{
|
771 | 771 | if len(args) != 1 {
|
772 | 772 | return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args))
|
773 | 773 | }
|
774 |
| -v := deref.ValueOf(args[0]) |
| 774 | +v := reflect.ValueOf(args[0]) |
775 | 775 | if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
|
776 | 776 | return nil, fmt.Errorf("cannot transform %s from pairs", v)
|
777 | 777 | }
|
@@ -808,7 +808,7 @@ var Builtins = []*Function{
|
808 | 808 | return nil, 0, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args))
|
809 | 809 | }
|
810 | 810 |
|
811 |
| -v := deref.ValueOf(args[0]) |
| 811 | +v := reflect.ValueOf(args[0]) |
812 | 812 | if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
|
813 | 813 | return nil, 0, fmt.Errorf("cannot reverse %s", v.Kind())
|
814 | 814 | }
|
@@ -843,7 +843,7 @@ var Builtins = []*Function{
|
843 | 843 | return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args))
|
844 | 844 | }
|
845 | 845 |
|
846 |
| -v := deref.ValueOf(deref.Deref(args[0])) |
| 846 | +v := reflect.ValueOf(args[0]) |
847 | 847 | if v.Kind() != reflect.Array && v.Kind() != reflect.Slice {
|
848 | 848 | return nil, fmt.Errorf("cannot uniq %s", v.Kind())
|
849 | 849 | }
|
@@ -897,7 +897,7 @@ var Builtins = []*Function{
|
897 | 897 | var arr []any
|
898 | 898 |
|
899 | 899 | for _, arg := range args {
|
900 |
| -v := deref.ValueOf(deref.Deref(arg)) |
| 900 | +v := reflect.ValueOf(arg) |
901 | 901 |
|
902 | 902 | if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
|
903 | 903 | return nil, 0, fmt.Errorf("cannot concat %s", v.Kind())
|
@@ -936,7 +936,7 @@ var Builtins = []*Function{
|
936 | 936 | if len(args) != 1 {
|
937 | 937 | return nil, 0, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args))
|
938 | 938 | }
|
939 |
| -v := deref.ValueOf(deref.Deref(args[0])) |
| 939 | +v := reflect.ValueOf(args[0]) |
940 | 940 | if v.Kind() != reflect.Array && v.Kind() != reflect.Slice {
|
941 | 941 | return nil, size, fmt.Errorf("cannot flatten %s", v.Kind())
|
942 | 942 | }
|
|
0 commit comments