MCPcopy Create free account
hub / github.com/google/go-github / newGetter

Function newGetter

github/gen-accessors.go:281–291  ·  view source on GitHub ↗
(receiverType, fieldName, fieldType, zeroValue string, namedStruct bool)

Source from the content-addressed store, hash-verified

279}
280
281func newGetter(receiverType, fieldName, fieldType, zeroValue string, namedStruct bool) *getter {
282 return &getter{
283 sortVal: strings.ToLower(receiverType) + "." + strings.ToLower(fieldName),
284 ReceiverVar: strings.ToLower(receiverType[:1]),
285 ReceiverType: receiverType,
286 FieldName: fieldName,
287 FieldType: fieldType,
288 ZeroValue: zeroValue,
289 NamedStruct: namedStruct,
290 }
291}
292
293func (t *templateData) addArrayType(x *ast.ArrayType, receiverType, fieldName string, isAPointer bool) {
294 var eltType string

Callers 4

addArrayTypeMethod · 0.85
genIdentGetterFunction · 0.85
addMapTypeMethod · 0.85
genSelectorExprGetterMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…