From 857ca4d978ff6fc5a94e77fafada8e18bde43cca Mon Sep 17 00:00:00 2001 From: houseme Date: Tue, 16 Nov 2021 00:59:15 +0800 Subject: [PATCH] URL encode and decode --- encoding/gurl/url.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/encoding/gurl/url.go b/encoding/gurl/url.go index a402cd1b4..031c4e194 100644 --- a/encoding/gurl/url.go +++ b/encoding/gurl/url.go @@ -27,14 +27,14 @@ func Decode(str string) (string, error) { return url.QueryUnescape(str) } -// RawEncode Encodes the given string according +// RawEncode does encode the given string according // URL-encode according to RFC 3986. // See http://php.net/manual/en/function.rawurlencode.php. func RawEncode(str string) string { return strings.Replace(url.QueryEscape(str), "+", "%20", -1) } -// RawDecode does decode +// RawDecode does decode the given string // Decode URL-encoded strings. // See http://php.net/manual/en/function.rawurldecode.php. func RawDecode(str string) (string, error) {