MCPcopy
hub / github.com/sqlc-dev/sqlc / usesType

Method usesType

internal/codegen/golang/imports.go:67–76  ·  view source on GitHub ↗
(typ string)

Source from the content-addressed store, hash-verified

65}
66
67func (i *importer) usesType(typ string) bool {
68 for _, strct := range i.Structs {
69 for _, f := range strct.Fields {
70 if hasPrefixIgnoringSliceAndPointerPrefix(f.Type, typ) {
71 return true
72 }
73 }
74 }
75 return false
76}
77
78func (i *importer) HasImports(filename string) bool {
79 imports := i.Imports(filename)

Callers

nothing calls this directly

Tested by

no test coverage detected