Skip to content
This repository was archived by the owner on Aug 22, 2022. It is now read-only.

Support Go 1.17 build stanzas (constraints) #151

@adamdecaf

Description

@adamdecaf

Go 1.17 is starting a migration with build constraints, so they are looking for //go:build ... stanzas in source files before any //+build ... lines. This breaks builds which check source code formatting/validation in CI that automatically updated.

It can be resolved with gofmt -s -w pkged.go which will add the required line. Example

The 1.17 release notes mention this change and the design proposal has a migration section for more details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions