mirror of
https://github.com/mudler/luet.git
synced 2025-08-31 14:52:02 +00:00
Add HumanReadableString() to Package
This commit is contained in:
@@ -87,6 +87,7 @@ type Package interface {
|
||||
SelectorMatchVersion(string) (bool, error)
|
||||
|
||||
String() string
|
||||
HumanReadableString() string
|
||||
}
|
||||
|
||||
type Tree interface {
|
||||
@@ -173,6 +174,10 @@ func (p *DefaultPackage) GetFingerPrint() string {
|
||||
return fmt.Sprintf("%s-%s-%s", p.Name, p.Category, p.Version)
|
||||
}
|
||||
|
||||
func (p *DefaultPackage) HumanReadableString() string {
|
||||
return fmt.Sprintf("%s/%s-%s", p.Category, p.Name, p.Version)
|
||||
}
|
||||
|
||||
func FromString(s string) Package {
|
||||
var unescaped DefaultPackage
|
||||
|
||||
|
Reference in New Issue
Block a user