MCPcopy Index your code
hub / github.com/livebud/bud / Methods

Method Methods

package/parser/struct.go:157–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155}
156
157func (stct *Struct) Methods() (methods []*Function) {
158 for _, file := range stct.Package().Files() {
159 for _, fn := range file.Functions() {
160 recv := fn.Receiver()
161 if recv == nil {
162 continue
163 }
164 if TypeName(recv.Type()) != stct.Name() {
165 continue
166 }
167 methods = append(methods, fn)
168 }
169 }
170 return methods
171}
172
173func (stct *Struct) Method(name string) *Function {
174 for _, method := range stct.Methods() {

Callers 2

MethodMethod · 0.95
loadMethodsFunction · 0.45

Calls 7

PackageMethod · 0.95
NameMethod · 0.95
TypeNameFunction · 0.85
ReceiverMethod · 0.80
TypeMethod · 0.65
FilesMethod · 0.45
FunctionsMethod · 0.45

Tested by

no test coverage detected