MCPcopy Create free account
hub / github.com/apache/dubbo-go-hessian2 / writeCollectionBegin

Function writeCollectionBegin

java_collection.go:116–136  ·  view source on GitHub ↗
(length int, typeName string, e *Encoder)

Source from the content-addressed store, hash-verified

114}
115
116func writeCollectionBegin(length int, typeName string, e *Encoder) error {
117 var err error
118 if length <= int(LIST_DIRECT_MAX) {
119 e.Append([]byte{BC_LIST_DIRECT + byte(length)})
120 err = e.Encode(typeName)
121 if err != nil {
122 return err
123 }
124 } else {
125 e.Append([]byte{BC_LIST_FIXED})
126 err = e.Encode(typeName)
127 if err != nil {
128 return err
129 }
130 err = e.Encode(int32(length))
131 if err != nil {
132 return nil
133 }
134 }
135 return nil
136}

Callers 1

EncObjectMethod · 0.85

Calls 2

AppendMethod · 0.80
EncodeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…