Source File
legacy_export.go
Belonging Package
google.golang.org/protobuf/internal/impl
func (Export) ( pref.EnumDescriptor) string {
return legacyEnumName()
}
func (Export) ( piface.MessageV1, pref.FullName) pref.MessageType {
if := (Export{}).protoMessageV2Of(); != nil {
return .ProtoReflect().Type()
}
return legacyLoadMessageInfo(reflect.TypeOf(), )
}
func (Export) ( pref.EnumDescriptor, []byte) (pref.EnumNumber, error) {
if [0] == '"' {
var pref.Name
if := json.Unmarshal(, &); != nil {
return 0, errors.New("invalid input for enum %v: %s", .FullName(), )
}
:= .Values().ByName()
if == nil {
return 0, errors.New("invalid value for enum %v: %s", .FullName(), )
}
return .Number(), nil
} else {
var pref.EnumNumber
if := json.Unmarshal(, &); != nil {
return 0, errors.New("invalid input for enum %v: %s", .FullName(), )
}
return , nil
}
}
var = [10]byte{0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff}
var [8]byte
binary.LittleEndian.PutUint32([0:4], crc32.ChecksumIEEE())
binary.LittleEndian.PutUint32([4:8], uint32(len()))
= make([]byte, 0, len()+len()*+len()+len())
= append(, [:]...)
for [0] == 0 {
:=
if > len() {
[0] = 0x01 // final bit per RFC 1951, section 3.2.3.
= len()
}
binary.LittleEndian.PutUint16([1:3], uint16()^0x0000)
binary.LittleEndian.PutUint16([3:5], uint16()^0xffff)
= append(, [:]...)
= append(, [:]...)
= [:]
}
= append(, [:]...)
return
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |