mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 01:08:47 +02:00
refactor: move some utility functions to goutils and update references
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"time"
|
||||
|
||||
. "github.com/yusing/godoxy/internal/logging/accesslog"
|
||||
"github.com/yusing/godoxy/internal/utils"
|
||||
"github.com/yusing/goutils/mockable"
|
||||
"github.com/yusing/goutils/task"
|
||||
expect "github.com/yusing/goutils/testing"
|
||||
)
|
||||
@@ -57,7 +57,7 @@ func fmtLog(cfg *RequestLoggerConfig) (ts string, line string) {
|
||||
|
||||
t := time.Now()
|
||||
logger := NewMockAccessLogger(testTask, cfg)
|
||||
utils.MockTimeNow(t)
|
||||
mockable.MockTimeNow(t)
|
||||
buf = logger.(RequestFormatter).AppendRequestLog(buf, req, resp)
|
||||
return t.Format(LogTimeFormat), string(buf)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user