Browse Source

Make static public

Vova Tkach 6 years ago
parent
commit
627d9ed79f
1 changed files with 4 additions and 4 deletions
  1. 4 4
      static/static.go

+ 4 - 4
static/static.go

@@ -5,16 +5,16 @@ import (
 	"os"
 )
 
-type static struct {
+type Static struct {
 	dirIndexFile string
 }
 
-func New(file string) *static {
-	r := static{dirIndexFile: file}
+func New(file string) *Static {
+	r := Static{dirIndexFile: file}
 	return &r
 }
 
-func (this *static) Response(dir string, w http.ResponseWriter, r *http.Request, before func(w http.ResponseWriter, r *http.Request), after func(w http.ResponseWriter, r *http.Request)) bool {
+func (this *Static) Response(dir string, w http.ResponseWriter, r *http.Request, before func(w http.ResponseWriter, r *http.Request), after func(w http.ResponseWriter, r *http.Request)) bool {
 	if r.URL.Path == "/" {
 		f, err := os.Open(dir + string(os.PathSeparator) + this.dirIndexFile)
 		if err == nil {