Skip to content

Commit 82798b2

Browse files
committed
Use strings.ReplaceAll where appropriate
1 parent b4a7016 commit 82798b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ func base64urldecode(s string) ([]byte, error) {
8080
enc := base64.RawURLEncoding
8181
// mega base64 decoder accepts the characters from both URLEncoding and StdEncoding
8282
// though nearly all strings are URL encoded
83-
s = strings.Replace(s, "+", "-", -1)
84-
s = strings.Replace(s, "/", "_", -1)
83+
s = strings.ReplaceAll(s, "+", "-")
84+
s = strings.ReplaceAll(s, "/", "_")
8585
return enc.DecodeString(s)
8686
}
8787

0 commit comments

Comments
 (0)