Skip to content

Commit 205fcd7

Browse files
authored
Merge pull request #4763 from kersten/fix/boilerplate-validate-pointer-receiver
🌱 (chore): use pointer receiver for Validate and rename shadowed var
2 parents 3f3be65 + 9aa8f87 commit 205fcd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/plugins/golang/v4/scaffolds/internal/templates/hack/boilerplate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ type Boilerplate struct {
4848
}
4949

5050
// Validate implements file.RequiresValidation
51-
func (f Boilerplate) Validate() error {
51+
func (f *Boilerplate) Validate() error {
5252
if f.License != "" {
53-
if _, found := knownLicenses[f.License]; !found {
53+
if _, foundKnown := knownLicenses[f.License]; !foundKnown {
5454
if _, found := f.Licenses[f.License]; !found {
5555
return fmt.Errorf("unknown specified license %s", f.License)
5656
}

0 commit comments

Comments
 (0)