We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a1d18d commit c960f49Copy full SHA for c960f49
pkg/response/optimize.go
@@ -274,11 +274,10 @@ func trimArrayFields(items []any, fields []string) []any {
274
275
// isURLKey matches "url", "*_url", and their dot-prefixed variants.
276
func isURLKey(key string) bool {
277
- base := key
278
- if idx := strings.LastIndex(base, "."); idx >= 0 {
279
- base = base[idx+1:]
+ if idx := strings.LastIndex(key, "."); idx >= 0 {
+ key = key[idx+1:]
280
}
281
- return base == "url" || strings.HasSuffix(base, "_url")
+ return key == "url" || strings.HasSuffix(key, "_url")
282
283
284
func isZeroValue(v any) bool {
0 commit comments