Skip to content

Commit

Permalink
Ensure generated code has consistent comments
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Oct 23, 2018
1 parent e9b7bc1 commit da82279
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/eksctl/version_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func main() {
"// +build release",
"",
"package main",
"// this file was generated by version_generate.go",
"// This file was generated by version_generate.go; DO NOT EDIT.",
`var builtAt = "" // will be set by goreleaser tool`,
`var gitCommit = "" // will be set by goreleaser tool`,
fmt.Sprintf("var gitTag = %q", os.Getenv("RELEASE_GIT_TAG")),
Expand Down
5 changes: 4 additions & 1 deletion pkg/ami/static_resolver_ami_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ func main() {

f := NewFile("ami")

f.Comment("This file was generated by static_resolver_ami_generate.go; DO NOT EDIT.")
f.Line()

d := Dict{}

client := newMultiRegionClient()
Expand All @@ -45,7 +48,7 @@ func main() {
d[Lit(family)] = Block(familyImages)
}

f.Comment("StaticImages is a map that holds the list of AMIs to be used by for static resolution, it is generated by static_resolver_ami_generate.go")
f.Comment("StaticImages is a map that holds the list of AMIs to be used by for static resolution")

f.Var().Id("StaticImages").Op("=").
Map(String()).Map(Int()).Map(String()).String().Values(d)
Expand Down
4 changes: 3 additions & 1 deletion pkg/nodebootstrap/maxpods_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ const maxPodsPerNodeTypeSourceText = "https://raw.github.com/awslabs/amazon-eks-
func main() {
f := NewFile("nodebootstrap")

f.Comment("Generated from " + maxPodsPerNodeTypeSourceText)
f.Comment("This file was generated by maxpods_generate.go; DO NOT EDIT.")
f.Line()
f.Comment("Source: " + maxPodsPerNodeTypeSourceText)

d := Dict{}

Expand Down

0 comments on commit da82279

Please sign in to comment.