MCPcopy
hub / github.com/cweill/gotests / fieldName

Function fieldName

internal/render/helpers.go:11–19  ·  view source on GitHub ↗
(f *models.Field)

Source from the content-addressed store, hash-verified

9)
10
11func fieldName(f *models.Field) string {
12 var n string
13 if f.IsNamed() {
14 n = f.Name
15 } else {
16 n = f.Type.String()
17 }
18 return n
19}
20
21func receiverName(f *models.Receiver) string {
22 var n string

Callers 1

Test_fieldNameFunction · 0.85

Calls 2

IsNamedMethod · 0.80
StringMethod · 0.45

Tested by 1

Test_fieldNameFunction · 0.68