Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug()
Debug provides the Debug functionality normally accessible to a given viper instance, but for a combination of the private static and dynamic registries.
func HandlerFunc ¶
func HandlerFunc(w http.ResponseWriter, r *http.Request)
HandlerFunc provides an http.HandlerFunc that renders the combined config registry (both static and dynamic) for debugging purposes.
By default, this writes the config in viper's "debug" format (what you get if you call viper.Debug()). If the query parameter "format" is present, and matches one of viper's supported config extensions (case-insensitively), the combined config will be written to the response in that format.
Example requests:
- GET /debug/config
- GET /debug/config?format=json
- GET /debug/config?format=yaml
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.