DecodeToString decodes and renders an encoded value.
(encoded string)
| 62 | |
| 63 | // DecodeToString decodes and renders an encoded value. |
| 64 | func (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. |
| 73 | func (d *DurationSetting) DecodeValue(encoded string) (time.Duration, error) { |
nothing calls this directly
no test coverage detected