Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Add build tags to make the project compatible with gopls #470

Merged
merged 1 commit into from Nov 24, 2022

Conversation

mislav
Copy link
Collaborator

@mislav mislav commented Nov 23, 2022

The gopls deamon for text editor integrations used to complain about the main() function being redeclared across multiple package main files that share the same directory. This is because these individual scripts were meant to be run with go run path/to/file.go instead of being built as a binary.

The latest gopls release supports recognizing files that are meant as individual runnable scripts, but they must be tagged with a build tag that makes them otherwise ignored.

The gopls deamon for text editor integrations used to complain about the `main()` function being redeclared across multiple `package main` files that share the same directory. This is because these individual scripts were meant to be run with `go run path/to/file.go` instead of being built as a binary. The latest gopls release supports recognizing files that are meant as individual runnable scripts, but they must be tagged with a build tag that makes them otherwise ignored.
@mislav mislav merged commit 4582d06 into master Nov 24, 2022
@mislav mislav deleted the gopls-compat branch November 24, 2022 14:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant