Skip to content

Commit

Permalink
Change generated code comment to match common Go
Browse files Browse the repository at this point in the history
According to https://golang.org/s/generatedcode the generated
Go code should have a comment matches the following regexp:
```
^// Code generated .* DO NOT EDIT\.$
```
  • Loading branch information
alexandear committed Nov 15, 2024
1 parent df7bc75 commit 10b12e5
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 26 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `MarshalJSON` and `UnmarshalJSON` method to `atomic.Pointer[T]` type
allowing users to use pointer with json.

### Changed
- Change a comment that marks generated Go code. Now it matches the regexp
`^// Code generated .* DO NOT EDIT\.$` according to common Go standard.

## [1.11.0] - 2023-05-02
### Fixed
- Fix `Swap` and `CompareAndSwap` for `Value` wrappers without initialization.
Expand Down
4 changes: 2 additions & 2 deletions bool.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions duration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions error.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions float32.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions float64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions int32.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions int64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/gen-atomicint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func run(args []string) error {
return fmt.Errorf("reformat source: %v", err)
}

io.WriteString(w, "// @generated Code generated by gen-atomicint.\n\n")
io.WriteString(w, "// Code generated by gen-atomicint. DO NOT EDIT.\n\n")
_, err = w.Write(bs)
return err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/gen-atomicwrapper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func run(args []string) error {
return fmt.Errorf("reformat source: %v", err)
}

io.WriteString(w, "// @generated Code generated by gen-atomicwrapper.\n\n")
io.WriteString(w, "// Code generated by gen-atomicwrapper. DO NOT EDIT.\n\n")
_, err = w.Write(bs)
return err
}
Expand Down
4 changes: 2 additions & 2 deletions string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions time.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions uint32.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions uint64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions uintptr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 10b12e5

Please sign in to comment.