mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-07-04 10:42:50 +00:00
Remove extraneous logging
This commit is contained in:
parent
839f8bc2d6
commit
d4ac58b2d8
@ -3,7 +3,6 @@ package static
|
|||||||
import (
|
import (
|
||||||
"embed"
|
"embed"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"log"
|
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -22,20 +21,16 @@ type HybridFS struct {
|
|||||||
// Open tries to open the requested file using all filesystems provided.
|
// Open tries to open the requested file using all filesystems provided.
|
||||||
// If neither succeeds, it returns the last error.
|
// If neither succeeds, it returns the last error.
|
||||||
func (f HybridFS) Open(name string) (fs.File, error) {
|
func (f HybridFS) Open(name string) (fs.File, error) {
|
||||||
log.Printf("serving static file: %s\n", name)
|
|
||||||
|
|
||||||
var file fs.File
|
var file fs.File
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
for _, candidate := range f.fs {
|
for _, candidate := range f.fs {
|
||||||
file, err = candidate.Open(name)
|
file, err = candidate.Open(name)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
log.Println("succeeded")
|
|
||||||
return file, nil
|
return file, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("failed: %v\n", err)
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func PrepareRq(rq *http.Request) {
|
func PrepareRq(rq *http.Request) {
|
||||||
log.Println(rq.RequestURI)
|
|
||||||
rq.URL.Path = strings.TrimSuffix(rq.URL.Path, "/")
|
rq.URL.Path = strings.TrimSuffix(rq.URL.Path, "/")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user