MCPcopy Index your code
hub / github.com/coder/guts / CommentForObject

Method CommentForObject

comments.go:14–21  ·  view source on GitHub ↗
(obj types.Object)

Source from the content-addressed store, hash-verified

12)
13
14func (p *GoParser) CommentForObject(obj types.Object) []bindings.SyntheticComment {
15 for _, pkg := range p.Pkgs {
16 if obj.Pkg() != nil && pkg.PkgPath == obj.Pkg().Path() {
17 return CommentForObject(obj, pkg)
18 }
19 }
20 return []bindings.SyntheticComment{}
21}
22
23// CommentForObject returns the comment group associated with the object's declaration.
24// For functions/methods it returns FuncDecl.Doc.

Callers 2

parseMethod · 0.80
buildStructMethod · 0.80

Calls 1

CommentForObjectFunction · 0.85

Tested by

no test coverage detected