Skip to content

Commit d7b802e

Browse files
authored
Merge pull request #2626 from NikhilSharmaWe/golangci-lint
🌱Made changes to prevent golanci-lint failing
2 parents 57ceb40 + 910edfc commit d7b802e

File tree

1 file changed

+11
-11
lines changed
  • pkg/plugins/golang/v3/scaffolds/internal/templates

1 file changed

+11
-11
lines changed

pkg/plugins/golang/v3/scaffolds/internal/templates/readme.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ func (f *Readme) SetTemplateDefaults() error {
4141
}
4242

4343
f.License = strings.Replace(
44-
strings.Replace(string(f.Boilerplate), "/*", "", 1),
44+
strings.Replace(f.Boilerplate, "/*", "", 1),
4545
"*/", "", 1)
4646

4747
f.TemplateBody = fmt.Sprintf(readmeFileTemplate,
48-
codeFence("sh", "kubectl apply -f config/samples/"),
49-
codeFence("sh", "make docker-build docker-push IMG=<some-registry>/{{ .ProjectName }}:tag"),
50-
codeFence("sh", "make deploy IMG=<some-registry>/{{ .ProjectName }}:tag"),
51-
codeFence("sh", "make uninstall"),
52-
codeFence("sh", "make undeploy"),
53-
codeFence("sh", "make install"),
54-
codeFence("sh", "make run"),
55-
codeFence("sh", "make manifests"))
48+
codeFence("kubectl apply -f config/samples/"),
49+
codeFence("make docker-build docker-push IMG=<some-registry>/{{ .ProjectName }}:tag"),
50+
codeFence("make deploy IMG=<some-registry>/{{ .ProjectName }}:tag"),
51+
codeFence("make uninstall"),
52+
codeFence("make undeploy"),
53+
codeFence("make install"),
54+
codeFence("make run"),
55+
codeFence("make manifests"))
5656

5757
return nil
5858
}
@@ -124,6 +124,6 @@ More information can be found via the [Kubebuilder Documentation](https://book.k
124124
{{ .License }}
125125
`
126126

127-
func codeFence(syntax string, code string) string {
128-
return "```" + syntax + "\n" + code + "\n" + "```"
127+
func codeFence(code string) string {
128+
return "```sh" + "\n" + code + "\n" + "```"
129129
}

0 commit comments

Comments
 (0)