mirror of
https://github.com/mudler/luet.git
synced 2025-08-17 14:56:46 +00:00
Add Rel() accessor to package
This commit is contained in:
parent
4dab89d209
commit
9dc8fccd12
@ -17,6 +17,7 @@ package pkg
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/crillab/gophersat/bf"
|
"github.com/crillab/gophersat/bf"
|
||||||
version "github.com/hashicorp/go-version"
|
version "github.com/hashicorp/go-version"
|
||||||
@ -57,6 +58,7 @@ type Package interface {
|
|||||||
|
|
||||||
SetPath(string)
|
SetPath(string)
|
||||||
GetPath() string
|
GetPath() string
|
||||||
|
Rel(string) string
|
||||||
}
|
}
|
||||||
|
|
||||||
type PackageSet interface {
|
type PackageSet interface {
|
||||||
@ -122,6 +124,11 @@ func (p *DefaultPackage) GetPath() string {
|
|||||||
return p.Path
|
return p.Path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *DefaultPackage) Rel(s string) string {
|
||||||
|
return filepath.Join(p.GetPath(), s)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func (p *DefaultPackage) SetPath(s string) {
|
func (p *DefaultPackage) SetPath(s string) {
|
||||||
p.Path = s
|
p.Path = s
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user