Commit 14f8d699
14f8d6997354Merged
Dmitriy Zhilyaev <[email protected]> ยท 2 years ago ยท 1 file ยท ~1 modified
Description
feat: graph and Graph()
Signed-off-by: Dmitriy Zhilyaev [email protected]
Details
- Commit
- 14f8d6997354
- Parent
- f26ef10b6fe0
pkg/plan/new.gomodifiedView file
@@ -4,6 +4,7 @@
44
"bytes"55
"context"66
"fmt"7+
"github.com/helmwave/helmwave/pkg/release/dependency"78
"os"89
"path/filepath"910
@@ -47,6 +48,7 @@
4748
4849
manifests map[uniqname.UniqName]string4950
unchanged release.Configs51+
graph *dependency.Graph[uniqname.UniqName, release.Config]5052
}5153
5254
// NewAndImport wrapper for New and Import in one.@@ -137,3 +139,16 @@
137139
138140
return plan139141
}142+
143+
func (p *Plan) Graph() *dependency.Graph[uniqname.UniqName, release.Config] {144+
if p.graph == nil {145+
graph, err := p.body.generateDependencyGraph()146+
if err != nil {147+
p.Logger().Fatal(err)148+
}149+
150+
return graph151+
}152+
153+
return p.graph154+
}