resources: Unify resource creation and kind setting
This removes the duplication of the kind string and cleans up things for resource creation.
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
package resources
|
||||
|
||||
import (
|
||||
"encoding/gob"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
@@ -42,7 +41,6 @@ const (
|
||||
|
||||
func init() {
|
||||
RegisterResource("nspawn", func() Res { return &NspawnRes{} })
|
||||
gob.Register(&NspawnRes{})
|
||||
}
|
||||
|
||||
// NspawnRes is an nspawn container resource.
|
||||
@@ -93,7 +91,6 @@ func (obj *NspawnRes) Init() error {
|
||||
if err := obj.svc.Init(); err != nil {
|
||||
return err
|
||||
}
|
||||
obj.BaseRes.Kind = "nspawn"
|
||||
return obj.BaseRes.Init()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user