Skip to content

Commit

Permalink
untrack go.work.sum, drops constants
Browse files Browse the repository at this point in the history
  • Loading branch information
M4tteoP committed Dec 1, 2023
1 parent 6ed85e9 commit 2e28c49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
12 changes: 0 additions & 12 deletions go.work.sum

This file was deleted.

9 changes: 2 additions & 7 deletions internal/url/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,15 @@ import (
"strings"
)

const (
urlUnescape = true
noUrlUnescape = false
)

// ParseQuery parses the URL-encoded query string and returns the corresponding map.
// It takes separators as parameter, for example: & or ; or &;
func ParseQuery(query string, separator byte) map[string][]string {
return doParseQuery(query, separator, urlUnescape)
return doParseQuery(query, separator, true)
}

// ParseQueryWithoutUnescape is a sibling of ParseQuery, but without performing URL unescape of keys and values.
func ParseQueryWithoutUnescape(query string, separator byte) map[string][]string {
return doParseQuery(query, separator, noUrlUnescape)
return doParseQuery(query, separator, false)
}

func doParseQuery(query string, separator byte, urlUnescape bool) map[string][]string {
Expand Down

0 comments on commit 2e28c49

Please sign in to comment.