The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Go package for deriving log/slog loggers decorated with details of an HTTP request.
Functions
LoggerWithRequest(req, logger) returns a *slog.Logger with the following keys set: method, user agent, accept, path, remote addr and user ip. If logger is nil the default slog logger is used. If logger was itself returned by LoggerWithRequest (or derived from one with With / WithGroup) the request keys are replaced rather than repeated, and anything added since is kept.
ReadUserIP(req) returns the value of the X-Real-Ip header, then the X-Forwarded-For header and finally the request's remote address.
Both headers can be set by the client, so treat user ip as informational unless you are behind a proxy that overwrites them.
LoggerWithRequest returns a `slog.Logger` instance with the following keys set: (HTTP) method, user agent, accept, path, remote addr and user ip.
If 'logger' is nil `slog.Default()` is used. If 'logger' was itself returned by `LoggerWithRequest` (or derived from such a logger using
`With` or `WithGroup`) its request attributes are replaced, not repeated, and anything added since is retained.