MCPcopy Create free account
hub / github.com/pydio/cells / Bytes

Method Bytes

common/config/encoder.go:77–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75}
76
77func (s storeWithEncoderValues) Bytes() []byte {
78 data := s.Values.Get()
79 if data == nil {
80 return []byte{}
81 }
82
83 if m := s.Marshaller; m != nil {
84 b, err := m.Marshal(data)
85 if err != nil {
86 return []byte{}
87 }
88
89 return b
90 }
91
92 return []byte(cast.ToString(data))
93}
94
95func (s storeWithEncoderValues) String() string {
96 data := s.Values.Get()

Callers

nothing calls this directly

Calls 3

ToStringMethod · 0.80
GetMethod · 0.65
MarshalMethod · 0.65

Tested by

no test coverage detected