mirror of
https://github.com/kataras/iris.git
synced 2025-12-23 21:07:03 +00:00
make cache package to work across multi handlers, remove the old 'WrapHandler' and keep the cache.Handler as documented only
Former-commit-id: b030cd92d26a9f646b060e379b3702b9a677749b
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -35,6 +36,7 @@ func (r resource) loadFromBase(dir string) string {
|
||||
}
|
||||
|
||||
result := string(b)
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -34,9 +35,9 @@ func (r resource) loadFromBase(dir string) string {
|
||||
panic(fullpath + " failed with error: " + err.Error())
|
||||
}
|
||||
result := string(b)
|
||||
// if runtime.GOOS != "windows" {
|
||||
// result = strings.Replace(result, "\n", "\r\n", -1)
|
||||
// }
|
||||
if runtime.GOOS != "windows" {
|
||||
result = strings.Replace(result, "\n", "\r\n", -1)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user