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

Method defaultConstantName

protoc-gen-go/generator/generator.go:1736–1738  ·  view source on GitHub ↗

defaultConstantName builds the name of the default constant from the message type name and the untouched field name, e.g. "Default_MessageType_FieldName"

(goMessageType, protoFieldName string)

Source from the content-addressed store, hash-verified

1734// defaultConstantName builds the name of the default constant from the message
1735// type name and the untouched field name, e.g. "Default_MessageType_FieldName"
1736func (g *Generator) defaultConstantName(goMessageType, protoFieldName string) string {
1737 return "Default_" + goMessageType + "_" + CamelCase(protoFieldName)
1738}
1739
1740// The different types of fields in a message and how to actually print them
1741// Most of the logic for generateMessage is in the methods of these types.

Callers 2

getterDefaultMethod · 0.95

Calls 1

CamelCaseFunction · 0.85

Tested by

no test coverage detected