Skip to content

Commit

Permalink
lib: fix typo in formatQuery error
Browse files Browse the repository at this point in the history
  • Loading branch information
efd6 committed May 21, 2024
1 parent 9cf1046 commit a0708c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -1057,14 +1057,14 @@ func formatQuery(arg ref.Val) ref.Val {
}
q, err := queryMap.ConvertToNative(reflectMapStringStringSliceType)
if err != nil {
return types.NewErr("no such overload for format_url: %v", err)
return types.NewErr("no such overload for format_query: %v", err)
}
switch q := q.(type) {
case url.Values:
return types.String(url.Values(q).Encode())
case map[string][]string:
return types.String(url.Values(q).Encode())
default:
return types.NewErr("invalid type for format_url: %T", q)
return types.NewErr("invalid type for format_query: %T", q)
}
}

0 comments on commit a0708c1

Please sign in to comment.