Documentation ¶
Index ¶
- func DNSToMap(msg *dns.Msg, format string) (m map[string]interface{})
- func Difference[K comparable, V any](m map[K]V, keys ...K) map[K]V
- func Flatten(m map[string]any, separator string) map[string]any
- func GetKeys[K comparable, V any](maps ...map[K]V) []K
- func GetValues[K comparable, V any](maps ...map[K]V) []V
- func HTTPRequesToMap(req *http.Request) (map[string]interface{}, error)
- func HTTPResponseToMap(resp *http.Response) (map[string]interface{}, error)
- func HTTPToMap(resp *http.Response, body, headers string, duration time.Duration, ...) (m map[string]interface{})
- func MergeMaps[K comparable, V any](maps ...map[K]V) (result map[K]V)
- func Walk(m map[string]any, callback func(k string, v any))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Difference ¶
func Difference[K comparable, V any](m map[K]V, keys ...K) map[K]V
Difference returns the inputted map without the keys specified as input.
func Flatten ¶
Flatten takes a map and returns a new one where nested maps are replaced by dot-delimited keys.
func GetKeys ¶
func GetKeys[K comparable, V any](maps ...map[K]V) []K
GetKeys returns the map's keys.
func GetValues ¶
func GetValues[K comparable, V any](maps ...map[K]V) []V
GetValues returns the map's values.
func HTTPRequesToMap ¶
HTTPRequesToMap Converts HTTP Request to Matcher Map
func HTTPResponseToMap ¶
HTTPResponseToMap Converts HTTP Response to Matcher Map
func HTTPToMap ¶
func HTTPToMap(resp *http.Response, body, headers string, duration time.Duration, format string) (m map[string]interface{})
HTTPToMap Converts HTTP to Matcher Map
func MergeMaps ¶
func MergeMaps[K comparable, V any](maps ...map[K]V) (result map[K]V)
MergeMaps merges the inputted maps into a new one. Be aware: In case of duplicated keys in multiple maps, the one ending in the result is unknown a priori.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.