Skip to content

Commit

Permalink
refactor(rest): optimize combineQueries function
Browse files Browse the repository at this point in the history
  • Loading branch information
lvlcn-t committed Sep 6, 2024
1 parent 6769acd commit c7fa0d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rest/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ func (e *Endpoint) Compile(baseURL string) (string, error) {

// combineQueries combines multiple queries into one.
func combineQueries(queries ...url.Values) url.Values {
if len(queries) == 0 {
return nil
}

q := url.Values{}
for _, query := range queries {
for key, values := range query {
Expand Down

0 comments on commit c7fa0d7

Please sign in to comment.