New ๐ŸŒŠ wave for @helm

Commit fa1c835c

fa1c835ce355Merged

Dmitriy Zhilyaev <[email protected]> ยท 4 years ago ยท 3 files ยท +1 added ยท ~2 modified

Description

Merge pull request #374 from helmwave/chart-short

Chart short

Details

Commit
fa1c835ce355
Parent
17820b1dcc20
Merge parent
0fb3df7068dc

pkg/release/config.gomodifiedView file

@@ -67,7 +67,24 @@
6767 // Chart is structure for chart download options.
6868 type Chart struct {
6969 action.ChartPathOptions `yaml:",inline"` //nolint:nolintlint
70- Name string
70+ Name string `yaml:"name"`
71+}
72+
73+// UnmarshalYAML flexible config
74+func (u *Chart) UnmarshalYAML(n *yaml.Node) (err error) {
75+ type raw Chart
76+ var name string
77+
78+ if err = n.Decode(&name); err == nil {
79+ u.Name = name
80+ return nil
81+ }
82+
83+ if err = n.Decode((*raw)(u)); err != nil {
84+ return err
85+ }
86+
87+ return nil
7188 }
7289
7390 func (rel *config) newInstall() *action.Install {