MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / DecodeToString

Method DecodeToString

pkg/settings/version.go:131–140  ·  view source on GitHub ↗

DecodeToString decodes and renders an encoded value.

(encoded string)

Source from the content-addressed store, hash-verified

129
130// DecodeToString decodes and renders an encoded value.
131func (v *VersionSetting) DecodeToString(encoded string) (string, error) {
132 if encoded == encodedDefaultVersion {
133 return encodedDefaultVersion, nil
134 }
135 cv, err := v.impl.Decode([]byte(encoded))
136 if err != nil {
137 return "", err
138 }
139 return cv.String(), nil
140}
141
142// GetInternal returns the setting's current value.
143func (v *VersionSetting) GetInternal(sv *Values) ClusterVersionImpl {

Callers

nothing calls this directly

Calls 2

DecodeMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected