lib: examples: Update to most recent API

At some point in the past the API changed. Fixed now.
This commit is contained in:
James Shubin
2017-04-10 03:09:00 -04:00
parent 525a1e8140
commit 66d9c7091c
4 changed files with 12 additions and 18 deletions

View File

@@ -57,9 +57,11 @@ func (obj *MyGAPI) Graph() (*pgraph.Graph, error) {
return nil, fmt.Errorf("libmgmt: MyGAPI is not initialized")
}
n1, err := resources.NewNoopRes("noop1")
if err != nil {
return nil, fmt.Errorf("can't create resource: %v", err)
n1 := &resources.NoopRes{
BaseRes: resources.BaseRes{
Name: "noop1",
MetaParams: resources.DefaultMetaParams,
},
}
// we can still build a graph via the yaml method