(packages []configfile.Package, l lock.Locker)
| 107 | } |
| 108 | |
| 109 | func PackagesFromConfig(packages []configfile.Package, l lock.Locker) []*Package { |
| 110 | result := []*Package{} |
| 111 | for _, cfgPkg := range packages { |
| 112 | pkg := newPackage(cfgPkg.VersionedName(), cfgPkg.IsEnabledOnPlatform, l) |
| 113 | pkg.DisablePlugin = cfgPkg.DisablePlugin |
| 114 | pkg.Patch = pkgNeedsPatch(pkg.CanonicalName(), cfgPkg.Patch) |
| 115 | pkg.outputs.selectedNames = lo.Uniq(append(pkg.outputs.selectedNames, cfgPkg.Outputs...)) |
| 116 | pkg.AllowInsecure = cfgPkg.AllowInsecure |
| 117 | result = append(result, pkg) |
| 118 | } |
| 119 | return result |
| 120 | } |
| 121 | |
| 122 | func PackageFromStringWithDefaults(raw string, locker lock.Locker) *Package { |
| 123 | return newPackage(raw, func() bool { return true } /*isInstallable*/, locker) |
no test coverage detected