all repos — homestead @ 20dd619b8605660dac67fa435d711e5f22da3174

Code for my website

ensure reasonable ordering of declarations in source

Alan Pearce
commit

20dd619b8605660dac67fa435d711e5f22da3174

parent

6f41d182abaf1af16fd0cc697abf0f2e9ce54c5c

1 file changed, 11 insertions(+), 11 deletions(-)

changed files
M domain/web/server/server.godomain/web/server/server.go
@@ -15,17 +15,6 @@ "github.com/Southclaws/fault"
"github.com/Southclaws/fault/fmsg" ) -var ( - CommitSHA = "local" - ShortSHA = "local" - serverHeader = fmt.Sprintf("homestead (%s)", ShortSHA) - - ReadHeaderTimeout = 10 * time.Second - ReadTimeout = 1 * time.Minute - WriteTimeout = 2 * time.Minute - IdleTimeout = 10 * time.Minute -) - type Options struct { Redirect bool `conf:"default:true"` ListenAddress string `conf:"default:::"`
@@ -45,6 +34,17 @@ options *Options
log *log.Logger server *http.Server } + +var ( + CommitSHA = "local" + ShortSHA = "local" + serverHeader = fmt.Sprintf("homestead (%s)", ShortSHA) + + ReadHeaderTimeout = 10 * time.Second + ReadTimeout = 1 * time.Minute + WriteTimeout = 2 * time.Minute + IdleTimeout = 10 * time.Minute +) func serverHeaderHandler(wrappedHandler http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {