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

Method DecodeToString

pkg/settings/duration.go:64–70  ·  view source on GitHub ↗

DecodeToString decodes and renders an encoded value.

(encoded string)

Source from the content-addressed store, hash-verified

62
63// DecodeToString decodes and renders an encoded value.
64func (d *DurationSetting) DecodeToString(encoded string) (string, error) {
65 v, err := d.DecodeValue(encoded)
66 if err != nil {
67 return "", err
68 }
69 return v.String(), nil
70}
71
72// DecodeValue decodes the value into a float.
73func (d *DurationSetting) DecodeValue(encoded string) (time.Duration, error) {

Callers

nothing calls this directly

Calls 2

DecodeValueMethod · 0.95
StringMethod · 0.65

Tested by

no test coverage detected