mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	Add any configured Go Workspace file to the config watcher
Fixes #10556
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user