Open chao-peng opened 3 days ago
Describe the bug
When using access log middleware and setup ${latency}, the output value contains too many white space!!!
To Reproduce
use the code below:
h.Use( accesslog.New( accesslog.WithFormat(`[${time}] status=${status} latency="${latency}" method=${method} path=${path} queryParams=${queryParams}`), ), )
Expected behavior
we expect the output is latency="459ns". But we got latency=" 459ns".
Hertz version:
hertz: v0.9.3
Environment:
go version go1.23.1 linux/amd64
Start working on this issue.
Describe the bug
When using access log middleware and setup ${latency}, the output value contains too many white space!!!
To Reproduce
use the code below:
Expected behavior
we expect the output is latency="459ns". But we got latency=" 459ns".
Hertz version:
hertz: v0.9.3
Environment:
go version go1.23.1 linux/amd64