aboutsummaryrefslogtreecommitdiff
path: root/handler.go
diff options
context:
space:
mode:
authorGravatar Garrett Squire <garrettsquire@gmail.com> 2016-10-27 16:39:01 -0700
committerGravatar Grayson Koonce <grayson.koonce@gmail.com> 2016-10-27 16:39:01 -0700
commit81051d9e2d5fa34552eccf25801d137b5486c804 (patch)
tree58a529445f3eaa5d80cf2d6f0cc4428e57df0eb4 /handler.go
parentac8374fd17e30fca9a7773a2a6f690a7ea4d2ec9 (diff)
downloadsally-81051d9e2d5fa34552eccf25801d137b5486c804.tar.gz
sally-81051d9e2d5fa34552eccf25801d137b5486c804.tar.zst
sally-81051d9e2d5fa34552eccf25801d137b5486c804.zip
Enforce alphabetical ordering of packages in YAML config (#22)
Diffstat (limited to 'handler.go')
-rw-r--r--handler.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/handler.go b/handler.go
index 09f5999..0a1c807 100644
--- a/handler.go
+++ b/handler.go
@@ -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) {