Add any configured Go Workspace file to the config watcher

Fixes #10556
This commit is contained in:
Bjørn Erik Pedersen
2022-12-19 15:50:53 +01:00
parent 0d4b17d4c0
commit 6db527483d
4 changed files with 27 additions and 4 deletions

View File

@@ -924,6 +924,7 @@ func (c *commandeer) printChangeDetected(typ string) {
const (
configChangeConfig = "config file"
configChangeGoMod = "go.mod file"
configChangeGoWork = "go work file"
)
func (c *commandeer) handleEvents(watcher *watcher.Batcher,
@@ -943,6 +944,9 @@ func (c *commandeer) handleEvents(watcher *watcher.Batcher,
if strings.Contains(ev.Name, "go.mod") {
configChangeType = configChangeGoMod
}
if strings.Contains(ev.Name, ".work") {
configChangeType = configChangeGoWork
}
}
if !isConfig {
// It may be one of the /config folders