We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95e5431 commit 4fa9784Copy full SHA for 4fa9784
httpserver.go
@@ -30,6 +30,7 @@ type Server struct {
30
shutdownTimeout time.Duration
31
listenAddress string
32
mode Mode
33
+ watchEnabled bool
34
35
HTTPServer *http.Server
36
log *slog.Logger
@@ -156,6 +157,9 @@ func (s *Server) startGracefulShutdown() error {
156
157
}
158
159
func (s *Server) handleFileChange(event notify.EventInfo) {
160
+ if !s.watchEnabled {
161
+ return
162
+ }
163
isGoFile := strings.HasSuffix(event.Path(), ".go")
164
if !isGoFile {
165
return
0 commit comments