Expose LoadContent

pull/443/head
jackgr 10 years ago
parent 51bbfafc87
commit 3217ae8ea5

@ -427,20 +427,20 @@ func (c *Chart) loadMember(filename string) (*Member, error) {
return result, nil return result, nil
} }
// ChartContent is abstraction for the contents of a chart. // Content is abstraction for the contents of a chart.
type ChartContent struct { type Content struct {
Chartfile *Chartfile `json:"chartfile"` Chartfile *Chartfile `json:"chartfile"`
Members []*Member `json:"members"` Members []*Member `json:"members"`
} }
// loadContent loads contents of a chart directory into ChartContent // LoadContent loads contents of a chart directory into Content
func (c *Chart) loadContent() (*ChartContent, error) { func (c *Chart) LoadContent() (*Content, error) {
ms, err := c.loadDirectory(c.Dir()) ms, err := c.loadDirectory(c.Dir())
if err != nil { if err != nil {
return nil, err return nil, err
} }
cc := &ChartContent{ cc := &Content{
Chartfile: c.Chartfile(), Chartfile: c.Chartfile(),
Members: ms, Members: ms,
} }

Loading…
Cancel
Save