Add Tree parser with bolt

Also add Tree builder (Recipe) which can recompose trees.
This commit is contained in:
Ettore Di Giacinto
2019-10-30 17:52:57 +01:00
committed by Ettore Di Giacinto
parent 9d0dc601b7
commit a5ceafca26
16 changed files with 574 additions and 78 deletions

View File

@@ -109,7 +109,7 @@ func (db *InMemoryDatabase) CreatePackage(p Package) (string, error) {
return ID, nil
}
func (db *InMemoryDatabase) FindPackage(name, version string) (Package, error) {
func (db *InMemoryDatabase) FindPackage(p Package) (Package, error) {
return nil, errors.New("Not implemented")
}
@@ -120,3 +120,8 @@ func (db *InMemoryDatabase) UpdatePackage(p Package) error {
func (db *InMemoryDatabase) GetPackages() []string {
return []string{}
}
func (db *InMemoryDatabase) Clean() error {
db.Database = map[string]string{}
return nil
}