Skip to content

Modernize code#412

Merged
guelfey merged 2 commits intogodbus:masterfrom
kolyshkin:modernize
Nov 14, 2025
Merged

Modernize code#412
guelfey merged 2 commits intogodbus:masterfrom
kolyshkin:modernize

Conversation

@kolyshkin
Copy link
Contributor

  1. Replace interface{} with any.
  2. Use strings.Cut and strings.CutPrefix.

See individual commits for details.

Since Go 1.18, any is an alias to interface{}. This improves
readability.

Generated by

	modernize -test -fix -category=efaceany  ./...

Signed-off-by: Kir Kolyshkin <[email protected]>
Simplify and optimize the code by using strings.Cut (available
since Go 1.18) and strings.CutPrefix (available since Go 1.20).

Signed-off-by: Kir Kolyshkin <[email protected]>
Copy link
Member

@guelfey guelfey left a comment

Choose a reason for hiding this comment

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

Thanks!

@guelfey guelfey merged commit c6e3fbd into godbus:master Nov 14, 2025
7 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.

2 participants