Skip to content

Commit

Permalink
🐛 fix copyright info when has not owner set
Browse files Browse the repository at this point in the history
  • Loading branch information
Camila Macedo committed Oct 30, 2020
1 parent 67f91f7 commit 243e429
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/plugin/v2/scaffolds/internal/templates/boilerplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ func (f *Boilerplate) SetTemplateDefaults() error {
const apache = `/*
{{ if .Owner -}}
Copyright {{ .Year }} {{ .Owner }}.
{{- else -}}
Copyright {{ .Year }}.
{{- end }}
Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -89,5 +91,7 @@ limitations under the License.
const none = `/*
{{ if .Owner -}}
Copyright {{ .Year }} {{ .Owner }}.
{{- else -}}
Copyright {{ .Year }}.
{{- end }}
*/`
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ func (f *Boilerplate) SetTemplateDefaults() error {
const apache = `/*
{{ if .Owner -}}
Copyright {{ .Year }} {{ .Owner }}.
{{- else -}}
Copyright {{ .Year }}.
{{- end }}
Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -89,5 +91,7 @@ limitations under the License.
const none = `/*
{{ if .Owner -}}
Copyright {{ .Year }} {{ .Owner }}.
{{- else -}}
Copyright {{ .Year }}.
{{- end }}
*/`

0 comments on commit 243e429

Please sign in to comment.