yamlgraph: Refactor parsing for dynamic resource registration
Avoid use of the reflect package, and use an extensible list of registred resource kinds. This also has the benefit of removing the empty VirtRes and AugeasRes struct types when compiling without libvirt and libaugeas.
This commit is contained in:
@@ -34,6 +34,7 @@ import (
|
||||
|
||||
func init() {
|
||||
gob.Register(&ExecRes{})
|
||||
RegisterResource("exec", func() Res { return &ExecRes{} })
|
||||
}
|
||||
|
||||
// ExecRes is an exec resource for running commands.
|
||||
|
||||
Reference in New Issue
Block a user