Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ require (
)

retract (
v1.25.0 // Breaks map/list ConvertToNative due to cel-go v0.27.0 (google/cel-go#1261).
v1.20.1 // Self-retraction.
v1.20.0 // Used v1 of the AWS v4 signing SDK.
)
14 changes: 14 additions & 0 deletions lib/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,13 @@ func makeMapStrings(val reflect.Value) (reflect.Value, error) {
return reflect.Value{}, err
}
return reflect.ValueOf(v), nil
case map[any]any:
val := types.DefaultTypeAdapter.NativeToValue(iface)
v, err := val.ConvertToNative(reflectMapStringStringSliceType)
if err != nil {
return reflect.Value{}, err
}
return reflect.ValueOf(v), nil
case ref.Val:
v, err := iface.ConvertToNative(reflectMapStringStringSliceType)
if err != nil {
Expand Down Expand Up @@ -972,6 +979,13 @@ func makeStrings(val reflect.Value) (reflect.Value, error) {
dst[i] = v.(string)
}
return reflect.ValueOf(dst), nil
case []any:
val := types.DefaultTypeAdapter.NativeToValue(iface)
v, err := val.ConvertToNative(reflectStringSliceType)
if err != nil {
return reflect.Value{}, err
}
return reflect.ValueOf(v), nil
default:
return reflect.Value{}, fmt.Errorf("invalid type: %T", iface)
}
Expand Down
7 changes: 7 additions & 0 deletions lib/limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ func mapStrings(val ref.Val) (map[string][]string, error) {
return nil, err
}
return v.(map[string][]string), nil
case map[any]any:
val := types.DefaultTypeAdapter.NativeToValue(iface)
v, err := val.ConvertToNative(reflectMapStringStringSliceType)
if err != nil {
return nil, err
}
return v.(map[string][]string), nil
case ref.Val:
v, err := iface.ConvertToNative(reflectMapStringStringSliceType)
if err != nil {
Expand Down
Loading