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

Method IncludeReference

convert.go:152–154  ·  view source on GitHub ↗

IncludeReference only generates types if they are referenced from the generated packages. This is useful for only generating a subset of the types that are being used.

(directory string, prefix string)

Source from the content-addressed store, hash-verified

150// IncludeReference only generates types if they are referenced from the generated packages.
151// This is useful for only generating a subset of the types that are being used.
152func (p *GoParser) IncludeReference(directory string, prefix string) error {
153 return p.include(directory, prefix, true)
154}
155
156func (p *GoParser) include(directory string, prefix string, reference bool) error {
157 pkgs, err := packages.Load(p.config, directory)

Callers 1

TestGenerationFunction · 0.80

Calls 1

includeMethod · 0.95

Tested by 1

TestGenerationFunction · 0.64