resources: Remove "NewRes" constructors

Remove the New constructors since calling Init should be done by the
engine, and not by the user even when using mgmt as a lib. This is also
the case in tests! It used to be the case that a user might want to call
Init manually, but that is no longer the case!
This commit is contained in:
James Shubin
2017-02-13 15:29:54 -05:00
parent f456aa1407
commit 57e919d7e5
12 changed files with 0 additions and 167 deletions

View File

@@ -46,20 +46,6 @@ type PkgRes struct {
fileList []string // FIXME: update if pkg changes
}
// NewPkgRes is a constructor for this resource. It also calls Init() for you.
func NewPkgRes(name, state string, allowuntrusted, allownonfree, allowunsupported bool) (*PkgRes, error) {
obj := &PkgRes{
BaseRes: BaseRes{
Name: name,
},
State: state,
AllowUntrusted: allowuntrusted,
AllowNonFree: allownonfree,
AllowUnsupported: allowunsupported,
}
return obj, obj.Init()
}
// Default returns some sensible defaults for this resource.
func (obj *PkgRes) Default() Res {
return &PkgRes{