AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.07k stars 349 forks source link

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

Closed mislav closed 1 year ago

mislav commented 1 year ago

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.