NewBuildCache creates a cache for a single build invocation
(config LoaderConfig)
| 18 | |
| 19 | // NewBuildCache creates a cache for a single build invocation |
| 20 | func NewBuildCache(config LoaderConfig) *BuildCache { |
| 21 | return &BuildCache{ |
| 22 | packages: make(map[string]*LoadResult), |
| 23 | loader: NewLoader(config), |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | // LoadImports loads types for given imports, using cache when available |
| 28 | // Returns merged LoadResult from all requested imports |