Documentation
¶
Overview ¶
Package version provides middleware that exposes an application's version. It sets an X-Version header on every response and, when a request targets the configured path, replies with a small JSON document reporting the version.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Version is the version string reported. Defaults to "unknown".
Version string
// Path is the endpoint that returns the version as JSON. Defaults to
// "/version".
Path string
// Header is the response header name. Defaults to "X-Version".
Header string
}
Options configures the version middleware.
Click to show internal directories.
Click to hide internal directories.