MCPcopy
hub / github.com/restic/restic / ToJSONString

Function ToJSONString

internal/ui/format.go:103–110  ·  view source on GitHub ↗
(status interface{})

Source from the content-addressed store, hash-verified

101}
102
103func ToJSONString(status interface{}) string {
104 buf := new(bytes.Buffer)
105 err := json.NewEncoder(buf).Encode(status)
106 if err != nil {
107 panic(err)
108 }
109 return buf.String()
110}
111
112// DisplayWidth returns the number of terminal cells needed to display s
113func DisplayWidth(s string) int {

Callers 7

printMethod · 0.92
errorMethod · 0.92
printMethod · 0.92
errorMethod · 0.92
newCheckCommandFunction · 0.92
EMethod · 0.92
runTagFunction · 0.92

Calls 2

EncodeMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected