MCPcopy Create free account
hub / github.com/apache/fory / readUTF8

Function readUTF8

go/fory/string.go:111–116  ·  view source on GitHub ↗
(buf *ByteBuffer, size int, err *Error)

Source from the content-addressed store, hash-verified

109}
110
111func readUTF8(buf *ByteBuffer, size int, err *Error) string {
112 data := buf.ReadBinary(size, err)
113 // Go intentionally keeps direct string conversion here. Rust is the runtime that checks UTF-8
114 // string payloads by default; Go preserves its platform behavior for invalid byte sequences.
115 return string(data)
116}
117
118// ============================================================================
119// String Serializers - implement unified Serializer interface

Callers 1

readStringFunction · 0.85

Calls 2

stringFunction · 0.50
ReadBinaryMethod · 0.45

Tested by

no test coverage detected