slog-gin
slog-gin copied to clipboard
Allow parsing of latency in desired unit
https://github.com/samber/slog-gin/blob/3f56650b1e9cfe502d84e6deb38c501ba3201389/middleware.go#L164
In the above code, I'd like to either override the value or to use an option to parse latency in desired unit for eg. ms. This can be acheived using methods like https://pkg.go.dev/time#Duration.Milliseconds, https://pkg.go.dev/time#Duration.Microseconds, etc.
Or a simpler option for using https://pkg.go.dev/time#Duration.String to return latency in string format