Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed May 2, 2020
1 parent b877b9c commit 67f24f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func main() {
if err != nil {
panic(err)
}
rows, err := PrintComments(obj)
rows, err := GenerateValuesTable(obj)
if err != nil {
panic(err)
}
Expand Down
7 changes: 2 additions & 5 deletions walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ import (
"sigs.k8s.io/kustomize/kyaml/yaml"
)

// PrintComments recursively copies the comments on fields in from to fields in to
func PrintComments(from *yaml.RNode) ([][]string, error) {
// walk the fields copying comments
// GenerateValuesTable produces a table of parameters from a chart values file
func GenerateValuesTable(from *yaml.RNode) ([][]string, error) {
p := printer{
rows: [][]string{},
}
Expand All @@ -40,8 +39,6 @@ func PrintComments(from *yaml.RNode) ([][]string, error) {
return p.rows, err
}

// printer implements walk.Visitor, and copies comments to fields shared between 2 instances
// of a resource
type printer struct {
rows [][]string
}
Expand Down

0 comments on commit 67f24f9

Please sign in to comment.