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:
@@ -19,7 +19,6 @@
|
||||
package resources
|
||||
|
||||
import (
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
@@ -39,7 +38,6 @@ const (
|
||||
)
|
||||
|
||||
func init() {
|
||||
gob.Register(&AugeasRes{})
|
||||
RegisterResource("augeas", func() Res { return &AugeasRes{} })
|
||||
}
|
||||
|
||||
@@ -94,7 +92,6 @@ func (obj *AugeasRes) Validate() error {
|
||||
|
||||
// Init initiates the resource.
|
||||
func (obj *AugeasRes) Init() error {
|
||||
obj.BaseRes.Kind = "augeas"
|
||||
return obj.BaseRes.Init() // call base init, b/c we're overriding
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user