MCPcopy
hub / github.com/golang/protobuf / DescName

Method DescName

protoc-gen-go/generator/generator.go:221–229  ·  view source on GitHub ↗

DescName returns the variable name used for the generated descriptor.

()

Source from the content-addressed store, hash-verified

219
220// DescName returns the variable name used for the generated descriptor.
221func (e *ExtensionDescriptor) DescName() string {
222 // The full type name.
223 typeName := e.TypeName()
224 // Each scope of the extension is individually CamelCased, and all are joined with "_" with an "E_" prefix.
225 for i, s := range typeName {
226 typeName[i] = CamelCase(s)
227 }
228 return "E_" + strings.Join(typeName, "_")
229}
230
231// ImportedDescriptor describes a type that has been publicly imported from another file.
232type ImportedDescriptor struct {

Callers 1

generateExtensionMethod · 0.80

Calls 2

TypeNameMethod · 0.95
CamelCaseFunction · 0.85

Tested by

no test coverage detected