diff options
| author | Garrett Squire <garrettsquire@gmail.com> | 2016-10-27 16:39:01 -0700 |
|---|---|---|
| committer | Grayson Koonce <grayson.koonce@gmail.com> | 2016-10-27 16:39:01 -0700 |
| commit | 81051d9e2d5fa34552eccf25801d137b5486c804 (patch) | |
| tree | 58a529445f3eaa5d80cf2d6f0cc4428e57df0eb4 /handler.go | |
| parent | ac8374fd17e30fca9a7773a2a6f690a7ea4d2ec9 (diff) | |
| download | sally-81051d9e2d5fa34552eccf25801d137b5486c804.tar.gz | |
Enforce alphabetical ordering of packages in YAML config (#22)
Diffstat (limited to 'handler.go')
| -rw-r--r-- | handler.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -9,7 +9,7 @@ import ( ) // CreateHandler creates a Sally http.Handler -func CreateHandler(config Config) http.Handler { +func CreateHandler(config *Config) http.Handler { router := httprouter.New() router.RedirectTrailingSlash = false @@ -29,7 +29,7 @@ func CreateHandler(config Config) http.Handler { } type indexHandler struct { - config Config + config *Config } func (h indexHandler) Handle(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { @@ -54,7 +54,7 @@ var indexTemplate = template.Must(template.New("index").Parse(` type packageHandler struct { pkgName string pkg Package - config Config + config *Config } func (h packageHandler) Handle(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { |