This commit is contained in:
Ettore Di Giacinto
2019-06-04 21:57:13 +02:00
parent a342bc515f
commit 39a3e433a7
4 changed files with 5 additions and 75 deletions

View File

@@ -27,25 +27,12 @@ type PackageAssert struct {
func DecodeModel(model map[string]bool) ([]PackageAssert, error) {
ass := make([]PackageAssert, 0)
for k, v := range model {
if a, err := pkg.DecodePackage(k); err == nil {
// fmt.Println("Flagged", v, a.Flagged())
// if v {
// fmt.Println("To flag", a)
// }
// if a.Flagged() && !v {
// a.IsFlagged(false)
// } else if !a.Flagged() && v {
// fmt.Println("To flag ", a)
// a.IsFlagged(true)
// }
//if a.State == common.STATE_CURRENT {
ass = append(ass, PackageAssert{Package: a, Value: v})
//} // Else, there was a state transition between Initial state and current run
} else {
a, err := pkg.DecodePackage(k)
if err != nil {
return nil, err
}
ass = append(ass, PackageAssert{Package: a, Value: v})
}
return ass, nil
}