From d35988521ef039170920f607917abc831cdacc8d Mon Sep 17 00:00:00 2001 From: Paul Banks Date: Fri, 11 May 2018 17:02:00 +0100 Subject: [PATCH] Go fmt cleanup --- agent/http.go | 12 ++++++------ lib/serf.go | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/agent/http.go b/agent/http.go index 102a893fd..e639d7d7b 100644 --- a/agent/http.go +++ b/agent/http.go @@ -152,9 +152,9 @@ func (s *HTTPServer) handler(enableDebug bool) http.Handler { if err != nil { 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 != "" { uifs = http.Dir(s.agent.config.UIDir) } else { @@ -164,14 +164,14 @@ func (s *HTTPServer) handler(enableDebug bool) http.Handler { fs.Prefix += "/v2/" } else { fs.Prefix += "/v1/" - } + } uifs = fs } - + if new_ui { - uifs = &redirectFS{fs:uifs} + uifs = &redirectFS{fs: uifs} } - + mux.Handle("/ui/", http.StripPrefix("/ui/", http.FileServer(uifs))) } diff --git a/lib/serf.go b/lib/serf.go index 715e07b78..ce2504a91 100644 --- a/lib/serf.go +++ b/lib/serf.go @@ -23,6 +23,5 @@ func SerfDefaultConfig() *serf.Config { // (using https://www.serf.io/docs/internals/simulator.html). base.LeavePropagateDelay = 3 * time.Second - return base }