diff options
author | Daniel Martà | 2023-04-26 13:51:04 +0000 |
---|---|---|
committer | GitHub | 2023-04-26 13:51:04 +0000 |
commit | 488707c7c81159d4a1f9a2b7690eb01723fd4e0b (patch) | |
tree | f09ab28f123e65526ab635354ff839840c4b6f93 | |
parent | 080f85c34f7bfc3de8b8441d51d434623a4a9f79 (diff) |
add go.work and remove Gopkg.toml as Go roots (#6884)
Gopkg.toml was used by dep, Go's original dependency management tool.
It was an experiment that culminated in official and built-in support
for Go modules in mid 2018, and dep was deprecated and archived
in mid 2020 per https://github.com/golang/go/issues/38158.
Now, in 2023, Gopkg.toml files are incredibly rare in actively developed
Go projects, as people use go.mod with Go modules instead.
While here, also add go.work as a root file, since that is used by
Go module workspaces, added in Go 1.18 in early 2022.
gopls or commands like `go build` work inside either go.work or go.mod.
These two root files are the same ones used by gopls integrations with
other editors like vim or neovim.
-rw-r--r-- | languages.toml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/languages.toml b/languages.toml index abf76d7c..dc8dac7d 100644 --- a/languages.toml +++ b/languages.toml @@ -292,7 +292,7 @@ name = "go" scope = "source.go" injection-regex = "go" file-types = ["go"] -roots = ["Gopkg.toml", "go.mod"] +roots = ["go.work", "go.mod"] auto-format = true comment-token = "//" language-server = { command = "gopls" } |