mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
- Add snack.Locker embed for per-provider mutex serialization - Update all providers (pacman, apk, apt, dpkg) to use []Target with version pinning support (pkg=version syntax) - Add lock/unlock to all mutating operations (Install, Remove, Purge, Upgrade, Update) - Add snack.TargetNames helper and formatTargets per provider - apt: add FromRepo (-t) and Reinstall support - dpkg: use Target.Source for .deb file paths in Install
11 lines
240 B
Go
11 lines
240 B
Go
package snack
|
|
|
|
// TargetNames extracts just the package names from a slice of targets.
|
|
func TargetNames(targets []Target) []string {
|
|
names := make([]string, len(targets))
|
|
for i, t := range targets {
|
|
names[i] = t.Name
|
|
}
|
|
return names
|
|
}
|