Skip to content

Commit

Permalink
Changed order of fields in queryOps struct to match the operations order
Browse files Browse the repository at this point in the history
  • Loading branch information
armadi1809 authored and francislavoie committed Mar 6, 2024
1 parent 22367d9 commit a87408e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/caddyhttp/rewrite/rewrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,15 @@ func changePath(req *http.Request, newVal func(pathOrRawPath string) string) {

// queryOps describes the operations to perform on query keys: add, set, rename and delete.
type queryOps struct {
// Adds query parameters; does not overwrite an existing query field,
// and only appends an additional value for that key if any already exist.
Add []queryOpsArguments `json:"add,omitempty"`
// Renames a query key from Key to Val, without affecting the value.
Rename []queryOpsArguments `json:"rename,omitempty"`

// Sets query parameters; overwrites a query key with the given value.
Set []queryOpsArguments `json:"set,omitempty"`

// Renames a query key from Key to Val, without affecting the value.
Rename []queryOpsArguments `json:"rename,omitempty"`
// Adds query parameters; does not overwrite an existing query field,
// and only appends an additional value for that key if any already exist.
Add []queryOpsArguments `json:"add,omitempty"`

// Deletes a given query key by name.
Delete []string `json:"delete,omitempty"`
Expand Down

0 comments on commit a87408e

Please sign in to comment.