type Builder … type resolverByIndex … const listFieldDeps … const listExtTargets … const listExtDeps … const listMethInDeps … const listMethOutDeps … type Out … // Build constructs a FileDescriptor given the parameters set in Builder. // It assumes that the inputs are well-formed and panics if any inconsistencies // are encountered. // // If NumEnums+NumMessages+NumExtensions+NumServices is zero, // then Build automatically derives them from the raw descriptor. func (db Builder) Build() (out Out) { … } // unmarshalCounts counts the number of enum, message, extension, and service // declarations in the raw message, which is either a FileDescriptorProto // or a MessageDescriptorProto depending on whether isFile is set. func (db *Builder) unmarshalCounts(b []byte, isFile bool) { … }