Closed GingerMoon closed 6 months ago
TraceInfo is designed without method of pointer, if trace is not enabled, TraceInfo should be an empty struct with all empty value field, RemoteAddr is one of the field must not empty if trace is enabled, so, if trace is not enabled, RemoteAddr is nil, otherwise not nil.
thanks! The reason why I was asking is because I enabled DevMode, but still got trace is not enabled error. Now it cannot be reproduced. I'd like to close the issue.
Hi imroc,
May I know why "trace is not enabled" when RemoteAddr is nil? This error message seems to be a little confusing. Please feel to let me know if a PR is needed.
func (t TraceInfo) Blame() string { if t.RemoteAddr == nil { return "trace is not enabled" } ...