mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 18:37:05 +00:00
add support for embed.FS
This commit is contained in:
@@ -40,9 +40,7 @@ func (r resource) strip(strip string) string {
|
||||
}
|
||||
|
||||
func (r resource) loadFromBase(dir string) string {
|
||||
filename := r.String()
|
||||
|
||||
filename = r.strip("/static")
|
||||
filename := r.strip("/static")
|
||||
|
||||
fullpath := filepath.Join(dir, filename)
|
||||
|
||||
@@ -52,11 +50,6 @@ func (r resource) loadFromBase(dir string) string {
|
||||
}
|
||||
|
||||
result := string(b)
|
||||
|
||||
if runtime.GOOS != "windows" {
|
||||
result = strings.ReplaceAll(result, "\n", "\r\n")
|
||||
result = strings.ReplaceAll(result, "\r\r", "")
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user