Skip to content

Commit

Permalink
Merge pull request #69 from horacimacias/master
Browse files Browse the repository at this point in the history
Parse requirement's alias and display "alias(name)" if 'alias' not empty
  • Loading branch information
norwoodj authored Jan 12, 2021
2 parents 81bf0c9 + 205c7bb commit 2e20ce4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/document/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ func getRequirementsTableTemplates() string {
requirementsSectionBuilder.WriteString("| Repository | Name | Version |\n")
requirementsSectionBuilder.WriteString("|------------|------|---------|\n")
requirementsSectionBuilder.WriteString(" {{- range .Dependencies }}")
requirementsSectionBuilder.WriteString(" {{ if .Alias }}")
requirementsSectionBuilder.WriteString("\n| {{ .Repository }} | {{ .Alias }}({{ .Name }}) | {{ .Version }} |")
requirementsSectionBuilder.WriteString(" {{ else }}")
requirementsSectionBuilder.WriteString("\n| {{ .Repository }} | {{ .Name }} | {{ .Version }} |")
requirementsSectionBuilder.WriteString(" {{ end }}")
requirementsSectionBuilder.WriteString(" {{- end }}")
requirementsSectionBuilder.WriteString("{{ end }}")

Expand Down
1 change: 1 addition & 0 deletions pkg/helm/chart_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type ChartRequirementsItem struct {
Name string
Version string
Repository string
Alias string
}

type ChartRequirements struct {
Expand Down

0 comments on commit 2e20ce4

Please sign in to comment.