mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
- Add brew package for Homebrew support on macOS and Linux - Implement NameNormalizer interface (NormalizeName, ParseArch) for all providers - Add darwin platform detection with Homebrew as default - Consolidate capabilities by removing separate *_linux.go/*_other.go files - Update tests for new capability expectations - Add comprehensive tests for AUR and brew providers - Update README with capability matrix and modern Target API usage 💘 Generated with Crush Assisted-by: AWS Claude Opus 4.5 via Crush <crush@charm.land>
17 lines
571 B
Go
17 lines
571 B
Go
package ports
|
|
|
|
// normalizeName returns the canonical form of a package name.
|
|
// OpenBSD packages use "name-version" format. This strips the version
|
|
// portion if present, returning just the name.
|
|
func normalizeName(name string) string {
|
|
n, _ := splitNameVersion(name)
|
|
return n
|
|
}
|
|
|
|
// parseArchNormalize extracts the architecture from a package name if present.
|
|
// OpenBSD package names do not embed architecture in the name itself
|
|
// (the arch is separate), so this returns the name unchanged.
|
|
func parseArchNormalize(name string) (string, string) {
|
|
return name, ""
|
|
}
|