Skip to content

Commit 76efe7d

Browse files
committed
minor changes
1 parent 214cdd5 commit 76efe7d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

memfile.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var (
2525
Compressable = []string{"", ".txt", ".htm", ".html", ".css", ".toml", ".php", ".js", ".json", ".md", ".mdown", ".xml", ".svg", ".go", ".cgi", ".py", ".pl", ".aspx", ".asp"}
2626
// RandomDictionary - String of Characters used in Etag generation, change in needed
2727
RandomDictionary = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
28-
Platform = runtime.GOOS
28+
platform = runtime.GOOS
2929
slash = getCorrectSlash()
3030
fslash = []byte("/")[0]
3131
)
@@ -129,7 +129,7 @@ func (mfi *MemFileInstance) Update() {
129129
return err
130130
} else {
131131
if mfi.DevMode {
132-
fmt.Println("New file Found: ", servePath)
132+
fmt.Println("New file Found: ", servePath, " from ", location)
133133
}
134134
return check(mfi.CacheFile(location, servePath), false)
135135
}
@@ -186,7 +186,7 @@ func (mfi *MemFileInstance) CacheFile(location string, servePath string) error {
186186
mfi.Cached.Store(servePath, memFile)
187187
}
188188

189-
// mutating things causes trouble when loads of ther stuff is accessing
189+
// mutating things causes trouble when loads of stuff is accessing
190190
// the MemFile so I'm locking it down while a file is being updated
191191
memFile.mutex.Lock()
192192

@@ -239,7 +239,7 @@ func ServablePath(dir string, loc string) string {
239239
if loc[:1] != slash {
240240
loc = slash + loc
241241
}
242-
if Platform == "windows" {
242+
if platform == "windows" {
243243
loc = strings.Replace(loc, "\\", "/", -1)
244244
}
245245
return loc
@@ -342,7 +342,7 @@ func ServeMemFile(res http.ResponseWriter, req *http.Request, memFile *MemFile,
342342
}
343343

344344
func getCorrectSlash() string {
345-
if Platform == "windows" {
345+
if platform == "windows" {
346346
return "\\"
347347
}
348348
return "/"

0 commit comments

Comments
 (0)