Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecorateContext ¶
DecorateContext decorates the given context with a key-value pair. It returns a new context with the provided key-value pair added.
func GetDescription ¶
GetDescription retrieves the description value from the context. If the value is found and is of type string, it is returned. Otherwise, an empty string is returned.
func GetEnvironment ¶
GetEnvironment returns the environment value from the given context. If the environment value is not found in the context, it returns "dev" as the default value.
Types ¶
type ContextKey ¶
type ContextKey string
var DescriptionKey ContextKey = "description"
var EnvironmentKey ContextKey = "environment"
var TitleKey ContextKey = "title"
Click to show internal directories.
Click to hide internal directories.