MCPcopy Create free account
hub / github.com/prometheus/procfs / dehumanizeSigned

Function dehumanizeSigned

bcache/get.go:176–185  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

174}
175
176func dehumanizeSigned(str string) (int64, error) {
177 value, err := dehumanize([]byte(strings.TrimPrefix(str, "-")))
178 if err != nil {
179 return 0, err
180 }
181 if strings.HasPrefix(str, "-") {
182 return int64(-value), nil
183 }
184 return int64(value), nil
185}
186
187type parser struct {
188 uuidPath string

Callers 1

parseWritebackRateDebugFunction · 0.85

Calls 1

dehumanizeFunction · 0.85

Tested by

no test coverage detected