Do not use interface in struct used for serialization

This commit is contained in:
Ettore Di Giacinto
2019-11-23 00:29:24 +01:00
parent 43ab851cb9
commit 542d45a646
6 changed files with 36 additions and 19 deletions

View File

@@ -37,7 +37,7 @@ type PackageHash struct {
// It is composed of a Package and a Value which is indicating the absence or not
// of the associated package state.
type PackageAssert struct {
Package pkg.Package
Package *pkg.DefaultPackage
Value bool
Hash PackageHash
}
@@ -51,7 +51,7 @@ func DecodeModel(model map[string]bool, db pkg.PackageDatabase) (PackagesAsserti
return nil, err
}
ass = append(ass, PackageAssert{Package: a, Value: v})
ass = append(ass, PackageAssert{Package: a.(*pkg.DefaultPackage), Value: v})
}
return ass, nil
}