Skip to content

Commit

Permalink
Update "generated file" hint to follow go convention. (#161)
Browse files Browse the repository at this point in the history
Go has a documented[1] convention identifying "generated" files:

> To convey to humans and machine tools that code is generated,
> generated source should have a line that matches the following
> regular expression (in Go syntax):
> ^// Code generated .* DO NOT EDIT\.$

[1]: https://golang.org/pkg/cmd/go/internal/generate/
  • Loading branch information
kadrach authored Sep 1, 2020
1 parent c1261e8 commit 62fb7b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
6 changes: 1 addition & 5 deletions python/rpdk/go/templates/main.go.tple
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Code generated by 'cfn generate', changes will be undone by the next invocation. DO NOT EDIT.
package main

import (
Expand All @@ -10,11 +11,6 @@ import (
"{{ path }}"
)

/*
This file is autogenerated, do not edit;
changes will be undone by the next 'cfn generate' command.
*/

// Handler is a container for the CRUDL actions exported by resources
type Handler struct{}

Expand Down
9 changes: 2 additions & 7 deletions python/rpdk/go/templates/types.go.tple
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
// Code generated by 'cfn generate', changes will be undone by the next invocation. DO NOT EDIT.
// Updates to this type are made my editing the schema file and executing the 'generate' command.
package resource

/*
This file is autogenerated, do not edit;
changes will be undone by the next 'generate' command.

Updates to this type are made my editing the schema file
and executing the 'generate' command
*/
{% for model_name, properties in models.items() %}

{% if model_name == "ResourceModel" %}
Expand Down

0 comments on commit 62fb7b3

Please sign in to comment.