MCPcopy
hub / github.com/prometheus/pushgateway / decodeBase64

Function decodeBase64

handler/push.go:175–178  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

173// and Filename Safe Alphabet” (RFC 4648). Padding characters (i.e. trailing
174// '=') are ignored.
175func 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.
181func splitLabels(labels string) (map[string]string, error) {

Callers 3

PushFunction · 0.85
splitLabelsFunction · 0.85
DeleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…