mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-05 08:27:05 +02:00
large refactoring, bug fixes, performance improvement
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/sirupsen/logrus"
|
||||
xhtml "golang.org/x/net/html"
|
||||
)
|
||||
|
||||
@@ -111,10 +111,9 @@ func tryAppendPathPrefixImpl(pOrig, pAppend string) string {
|
||||
|
||||
var tryAppendPathPrefix func(string, string) string
|
||||
var _ = func() int {
|
||||
if glog.V(4) {
|
||||
if logLevel == logrus.DebugLevel {
|
||||
tryAppendPathPrefix = func(s1, s2 string) string {
|
||||
replaced := tryAppendPathPrefixImpl(s1, s2)
|
||||
glog.Infof("[Path sub] %s -> %s", s1, replaced)
|
||||
return replaced
|
||||
}
|
||||
} else {
|
||||
@@ -192,4 +191,4 @@ func (*Utils) respJSSubPath(r *http.Response, p string) error {
|
||||
func (*Utils) fileOK(path string) bool {
|
||||
_, err := os.Stat(path)
|
||||
return err == nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user