MCPcopy Create free account
hub / github.com/a-h/rest / getCommentsForPackage

Method getCommentsForPackage

schema.go:392–402  ·  view source on GitHub ↗
(pkg string)

Source from the content-addressed store, hash-verified

390}
391
392func (api *API) getCommentsForPackage(pkg string) (pkgComments map[string]string, err error) {
393 if pkgComments, loaded := api.comments[pkg]; loaded {
394 return pkgComments, nil
395 }
396 pkgComments, err = parser.Get(pkg)
397 if err != nil {
398 return
399 }
400 api.comments[pkg] = pkgComments
401 return
402}
403
404func (api *API) getTypeComment(pkg string, name string) (comment string, deprecated bool, err error) {
405 pkgComments, err := api.getCommentsForPackage(pkg)

Callers 2

getTypeCommentMethod · 0.95
getTypeFieldCommentMethod · 0.95

Calls 1

GetFunction · 0.92

Tested by

no test coverage detected