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:
@@ -56,17 +56,6 @@ type PasswordRes struct {
|
||||
recWatcher *recwatch.RecWatcher
|
||||
}
|
||||
|
||||
// NewPasswordRes is a constructor for this resource. It also calls Init() for you.
|
||||
func NewPasswordRes(name string, length uint16) (*PasswordRes, error) {
|
||||
obj := &PasswordRes{
|
||||
BaseRes: BaseRes{
|
||||
Name: name,
|
||||
},
|
||||
Length: length,
|
||||
}
|
||||
return obj, obj.Init()
|
||||
}
|
||||
|
||||
// Default returns some sensible defaults for this resource.
|
||||
func (obj *PasswordRes) Default() Res {
|
||||
return &PasswordRes{
|
||||
|
||||
Reference in New Issue
Block a user