Function fills 'ps' set with packages from 'packages' import information. In case if package is not in the cache, it creates one and adds one to the cache.
(ps map[string]*package_file_cache, pkgs []package_import)
| 226 | // Function fills 'ps' set with packages from 'packages' import information. |
| 227 | // In case if package is not in the cache, it creates one and adds one to the cache. |
| 228 | func (c package_cache) append_packages(ps map[string]*package_file_cache, pkgs []package_import) { |
| 229 | for _, m := range pkgs { |
| 230 | if _, ok := ps[m.abspath]; ok { |
| 231 | continue |
| 232 | } |
| 233 | |
| 234 | if mod, ok := c[m.abspath]; ok { |
| 235 | ps[m.abspath] = mod |
| 236 | } else { |
| 237 | mod = new_package_file_cache(m.abspath, m.path) |
| 238 | ps[m.abspath] = mod |
| 239 | c[m.abspath] = mod |
| 240 | } |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | var g_builtin_unsafe_package = []byte(` |
| 245 | import |
no test coverage detected