Added golangci linting and improved what was required

This commit is contained in:
Nicholas Thompson
2019-03-07 19:04:15 +02:00
committed by ncthompson
parent 206159cdea
commit 2456f45836
15 changed files with 244 additions and 255 deletions

View File

@@ -7,20 +7,10 @@ import (
"net/http"
)
type static struct {
http.FileSystem
}
func NewStatic() http.Handler {
statikFs, err := fs.New()
if err != nil {
log.Fatal(err)
}
return &static{
FileSystem: statikFs,
}
}
func (s *static) ServeHTTP(w http.ResponseWriter, r *http.Request) {
http.FileServer(s).ServeHTTP(w, r)
return http.FileServer(statikFs)
}