Go fmt cleanup
This commit is contained in:
parent
78d54a4be9
commit
d35988521e
|
@ -152,9 +152,9 @@ func (s *HTTPServer) handler(enableDebug bool) http.Handler {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
new_ui = false
|
new_ui = false
|
||||||
}
|
}
|
||||||
var uifs http.FileSystem;
|
var uifs http.FileSystem
|
||||||
|
|
||||||
// Use the custom UI dir if provided.
|
// Use the custom UI dir if provided.
|
||||||
if s.agent.config.UIDir != "" {
|
if s.agent.config.UIDir != "" {
|
||||||
uifs = http.Dir(s.agent.config.UIDir)
|
uifs = http.Dir(s.agent.config.UIDir)
|
||||||
} else {
|
} else {
|
||||||
|
@ -164,14 +164,14 @@ func (s *HTTPServer) handler(enableDebug bool) http.Handler {
|
||||||
fs.Prefix += "/v2/"
|
fs.Prefix += "/v2/"
|
||||||
} else {
|
} else {
|
||||||
fs.Prefix += "/v1/"
|
fs.Prefix += "/v1/"
|
||||||
}
|
}
|
||||||
uifs = fs
|
uifs = fs
|
||||||
}
|
}
|
||||||
|
|
||||||
if new_ui {
|
if new_ui {
|
||||||
uifs = &redirectFS{fs:uifs}
|
uifs = &redirectFS{fs: uifs}
|
||||||
}
|
}
|
||||||
|
|
||||||
mux.Handle("/ui/", http.StripPrefix("/ui/", http.FileServer(uifs)))
|
mux.Handle("/ui/", http.StripPrefix("/ui/", http.FileServer(uifs)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,5 @@ func SerfDefaultConfig() *serf.Config {
|
||||||
// (using https://www.serf.io/docs/internals/simulator.html).
|
// (using https://www.serf.io/docs/internals/simulator.html).
|
||||||
base.LeavePropagateDelay = 3 * time.Second
|
base.LeavePropagateDelay = 3 * time.Second
|
||||||
|
|
||||||
|
|
||||||
return base
|
return base
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue