Skip to content

refactor: remove obsolete // +build tag#767

Open
zjumathcode wants to merge 1 commit intoiotaledger:developfrom
zjumathcode:develop
Open

refactor: remove obsolete // +build tag#767
zjumathcode wants to merge 1 commit intoiotaledger:developfrom
zjumathcode:develop

Conversation

@zjumathcode
Copy link

@zjumathcode zjumathcode commented Dec 2, 2025

Description of change

From Go 1.17, the preferred syntax for build constraints is //go:build,
which replaces the old // +build form. The old style is now considered
deprecated but still supported for backward compatibility.

This change removes the obsolete // +build xxx line, keeping only the
modern //go:build xxx directive.

More info: golang/go#41184 and https://go.dev/doc/go1.17#build-lines

Design Doc / Proposal:
https://go.dev/design/draft-gobuild

Links to any relevant issues

None

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

No need.

Change checklist

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have selected the develop branch as the target branch
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Signed-off-by: zjumathcode <pai314159@2980.com>
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.

1 participant