Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
swagger: fix "generated code" comment not in correct format
Browse files Browse the repository at this point in the history
As described in https://golang.org/s/generatedcode, Go has
a formalized format that should be used to indicate that a
file is generated.

Matching that format helps linters to skip generated files;

From https://golang.org/s/generatedcode (golang/go#13560 (comment));

> Generated files are marked by a line of text that matches the regular expression, in Go syntax:
>
>     ^// Code generated .* DO NOT EDIT\.$
>
> The `.*` means the tool can put whatever folderol it wants in there, but the comment
> must be a single line and must start with `Code generated` and end with `DO NOT EDIT.`,
> with a period.
>
> The text may appear anywhere in the file.

This patch updates the template used for our generated types
to match that format.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3df4f86f21fbcae3535e2231828dce16a1940dbb
Component: engine
  • Loading branch information
thaJeztah committed Nov 5, 2019
1 parent 20d547f commit e73f78d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/engine/api/templates/server/operation.gotmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package {{ .Package }} // import "github.com/docker/docker/api/types/{{ .Package }}"

// ----------------------------------------------------------------------------
// DO NOT EDIT THIS FILE
// This file was generated by `swagger generate operation`
// Code generated by `swagger generate operation`. DO NOT EDIT.
//
// See hack/generate-swagger-api.sh
// ----------------------------------------------------------------------------
Expand Down

0 comments on commit e73f78d

Please sign in to comment.