MCPcopy Create free account
hub / github.com/OpenPrinting/goipp / String

Method String

value.go:36–52  ·  view source on GitHub ↗

String converts Values to string

()

Source from the content-addressed store, hash-verified

34
35// String converts Values to string
36func (values Values) String() string {
37 if len(values) == 1 {
38 return values[0].V.String()
39 }
40
41 var buf bytes.Buffer
42 buf.Write([]byte("["))
43 for i, v := range values {
44 if i != 0 {
45 buf.Write([]byte(","))
46 }
47 buf.Write([]byte(v.V.String()))
48 }
49 buf.Write([]byte("]"))
50
51 return buf.String()
52}
53
54// Clone creates a shallow copy of Values.
55// For nil input it returns nil output.

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected