Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultHeaderKey = "x-preview-env"
DefaultHeaderKey is used to extract the preview environment name from the HTTP header.
Variables ¶
View Source
var EnvContextKey = envContextKey{}
EnvContextKey is the key used to store the environment name in a context.
Functions ¶
func EnvironmentFromContext ¶
EnvironmentFromContext extracts the environment name from the context.
func GetHeaderKey ¶ added in v0.5.0
func GetHeaderKey() string
GetHeaderKey returns the header key from DIVERGE_HEADER_KEY or DefaultHeaderKey.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.