You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// In URL parameters, the following characters are considered safe and do not need encoding [rfc3986](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.1):
8
+
// Alphabetic characters: A-Z, a-z
9
+
// Digits: 0-9
10
+
// Hyphen: -
11
+
// Underscore: _
12
+
// Period: .
13
+
// Tilde: ~
14
+
15
+
// stdBase64 is a [base64.Encoding] based on [base64.URLEncoding] without padding character.
16
+
// alphabet of base64: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_
Copy file name to clipboardExpand all lines: id/uuid.go
+46-53Lines changed: 46 additions & 53 deletions
Original file line number
Diff line number
Diff line change
@@ -2,57 +2,58 @@ package id
2
2
3
3
import (
4
4
"encoding"
5
-
"encoding/base64"
6
5
"encoding/json"
7
6
"errors"
8
7
"slices"
9
8
)
10
9
11
-
// In URL parameters, the following characters are considered safe and do not need encoding [rfc3986](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.1):
12
-
// Alphabetic characters: A-Z, a-z
13
-
// Digits: 0-9
14
-
// Hyphen: -
15
-
// Underscore: _
16
-
// Period: .
17
-
// Tilde: ~
18
-
19
-
// Base64 is a [base64.Encoding] based on [base64.URLEncoding] without padding character.
20
-
// alphabet of base64: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_
0 commit comments