aboutsummaryrefslogtreecommitdiff
path: root/query.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2020-12-18 00:26:47 -0500
committerAdnan Maolood <[email protected]>2020-12-18 00:26:47 -0500
commitd52d0af783e95740d517d1d3e67b810eab7d7766 (patch)
tree65a153fded71bb69c76dd5ce466aa13f68c636a0 /query.go
parentRemove Input function (diff)
downloadgo-gemini-d52d0af783e95740d517d1d3e67b810eab7d7766.tar.xz
go-gemini-d52d0af783e95740d517d1d3e67b810eab7d7766.zip
Update QueryEscape documentation
Diffstat (limited to 'query.go')
-rw-r--r--query.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/query.go b/query.go
index 3e80e8b..d627c45 100644
--- a/query.go
+++ b/query.go
@@ -5,8 +5,9 @@ import (
"strings"
)
-// QueryEscape properly escapes a string for use in a Gemini URL query.
-// It is like url.PathEscape except that it also replaces plus signs with their percent-encoded counterpart.
+// QueryEscape escapes a string for use in a Gemini URL query.
+// It is like url.PathEscape except that it also replaces plus signs
+// with their percent-encoded counterpart.
func QueryEscape(query string) string {
return strings.ReplaceAll(url.PathEscape(query), "+", "%2B")
}