decodeBase64 decodes the provided string using the “Base 64 Encoding with URL and Filename Safe Alphabet” (RFC 4648). Padding characters (i.e. trailing '=') are ignored.
(s string)
| 173 | // and Filename Safe Alphabet” (RFC 4648). Padding characters (i.e. trailing |
| 174 | // '=') are ignored. |
| 175 | func decodeBase64(s string) (string, error) { |
| 176 | b, err := base64.RawURLEncoding.DecodeString(strings.TrimRight(s, "=")) |
| 177 | return string(b), err |
| 178 | } |
| 179 | |
| 180 | // splitLabels splits a labels string into a label map mapping names to values. |
| 181 | func splitLabels(labels string) (map[string]string, error) { |
no outgoing calls
no test coverage detected
searching dependent graphs…