diff options
| author | Adnan Maolood <[email protected]> | 2020-12-18 00:26:47 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2020-12-18 00:26:47 -0500 |
| commit | d52d0af783e95740d517d1d3e67b810eab7d7766 (patch) | |
| tree | 65a153fded71bb69c76dd5ce466aa13f68c636a0 /query.go | |
| parent | Remove Input function (diff) | |
| download | go-gemini-d52d0af783e95740d517d1d3e67b810eab7d7766.tar.xz go-gemini-d52d0af783e95740d517d1d3e67b810eab7d7766.zip | |
Update QueryEscape documentation
Diffstat (limited to 'query.go')
| -rw-r--r-- | query.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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") } |