Refactoring: make PackageQuery work on PackageLike objects (not necessarily Packages). #71

This commit is contained in:
Andrey Smirnov
2015-03-18 23:25:20 +03:00
parent 36326788b0
commit 4d622e467c
2 changed files with 34 additions and 9 deletions
+15
View File
@@ -294,6 +294,21 @@ func (p *Package) MatchesDependency(dep Dependency) bool {
panic("unknown relation")
}
// GetName returns package name
func (p *Package) GetName() string {
return p.Name
}
// GetVersion returns package version
func (p *Package) GetVersion() string {
return p.Version
}
// GetArchitecture returns package arch
func (p *Package) GetArchitecture() string {
return p.Architecture
}
// GetDependencies compiles list of dependenices by flags from options
func (p *Package) GetDependencies(options int) (dependencies []string) {
deps := p.Deps()