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