Skip to content

modernize with go1.20 features#50

Merged
thaJeztah merged 3 commits intodocker:mainfrom
kolyshkin:go120
Apr 15, 2026
Merged

modernize with go1.20 features#50
thaJeztah merged 3 commits intodocker:mainfrom
kolyshkin:go120

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin commented Apr 10, 2026

- What I did
Wrote a set of patches that benefit from having Go 1.20 (as #36 was merged).

See individual commits for details.

- How I did it
Mostly using nvim

- How to verify it
go test

- Description for the changelog
n/a

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah
Copy link
Copy Markdown
Member

having a quick bite; will rebase and un-draft #49 shortly then we have CI running

@thaJeztah thaJeztah changed the title Use Go 1.20 modernize with go1.20 features Apr 15, 2026
The new keyword, any, is added to Go 1.18 for the sake of readability.
It is an alias to interface{}.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Now when we have Go 1.20 we can finally switch from strings.Split[N] to
strings.Cut. The code is easier and more readable, and we no longer
deal with slices.

There is a slight difference in behavior -- the old code was giving
hints when an extra = or : was there. The new code just returns
NumError. To me this is not a big deal.

All the existing tests still pass. Added some new tests to cover the
case of extra = signs which was not covered before.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Addressing the TODO item added by commit 7375726.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (did a quick rebase to get the GitHub actions running)

@thaJeztah thaJeztah merged commit 2bd057e into docker:main Apr 15, 2026
9 checks passed
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.

3 participants