Skip to content

Commit

Permalink
clarify maps behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
averche committed Aug 2, 2023
1 parent b394349 commit 1822f87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions request_modifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,9 @@ func (m *requestModifiers) additionalQueryParametersOrDefault() url.Values {
// done according the following rules:
//
// - for scalars : the rhs values, if present, will overwrite the lhs values
// - for slices : the rhs values will be appended to the lhs values
// - for maps : the rhs values will be copied into the lhs using maps.Copy
// - for slices : the rhs values will be appended to the lhs values
// - for maps : the rhs values for the new keys will be appended to lhs
// the rhs values for the existing keys will overwrite lhs
func mergeRequestModifiers(lhs, rhs *requestModifiers) {
if rhs.headers.userAgent != "" {
lhs.headers.userAgent = rhs.headers.userAgent
Expand Down

0 comments on commit 1822f87

Please sign in to comment.