From 62fb7b394f63fbd2e9ed6f45ac59c7a7e02bcdce Mon Sep 17 00:00:00 2001 From: Niko Eckerskorn Date: Tue, 1 Sep 2020 11:56:08 +1000 Subject: [PATCH] Update "generated file" hint to follow go convention. (#161) 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/ --- python/rpdk/go/templates/main.go.tple | 6 +----- python/rpdk/go/templates/types.go.tple | 9 ++------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/python/rpdk/go/templates/main.go.tple b/python/rpdk/go/templates/main.go.tple index 5acac129..4bb57f18 100644 --- a/python/rpdk/go/templates/main.go.tple +++ b/python/rpdk/go/templates/main.go.tple @@ -1,3 +1,4 @@ +// Code generated by 'cfn generate', changes will be undone by the next invocation. DO NOT EDIT. package main import ( @@ -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{} diff --git a/python/rpdk/go/templates/types.go.tple b/python/rpdk/go/templates/types.go.tple index 2178a2fe..e54eac02 100644 --- a/python/rpdk/go/templates/types.go.tple +++ b/python/rpdk/go/templates/types.go.tple @@ -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" %}