DescName returns the variable name used for the generated descriptor.
()
| 219 | |
| 220 | // DescName returns the variable name used for the generated descriptor. |
| 221 | func (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. |
| 232 | type ImportedDescriptor struct { |
no test coverage detected