Skip to content

style: simplify and modernize#2305

Open
gaiaz-iusipov wants to merge 3 commits intooapi-codegen:mainfrom
gaiaz-iusipov:modernize
Open

style: simplify and modernize#2305
gaiaz-iusipov wants to merge 3 commits intooapi-codegen:mainfrom
gaiaz-iusipov:modernize

Conversation

@gaiaz-iusipov
Copy link
Copy Markdown
Contributor

@gaiaz-iusipov gaiaz-iusipov commented Mar 26, 2026

In this PR I made small stylistic changes: using functions from standard packages (maps.Copy, slices.Contains, etc.)

Signed-off-by: Gaiaz Iusipov <g.iusipov@gmail.com>
@gaiaz-iusipov gaiaz-iusipov requested a review from a team as a code owner March 26, 2026 13:14
@mromaszewicz
Copy link
Copy Markdown
Member

You have two unrelated changes here - using modern packages, and the error compile time check.

I would very happily merge the first part, as-is, however, since we are a code generator, we can ensure that the generated code always implements error, without having a compile time check for our own output. I don't think we need that second part.

You've also only added that to the stdhttp server, and we try to keep as much parity between generated code as possible.

@gaiaz-iusipov
Copy link
Copy Markdown
Contributor Author

Thanks. This kind of compile-time check is used in various Go projects as a guarantee that certain types implement an interface and that this behavior won’t accidentally break in the future. But I agree that it’s better if I remove those changes and keep only the set that introduces the use of the standard package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants