Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromURLStringToStruct ¶
FromURLStringToStruct is an additional wrapper that parses the URL string, and then calls FromURLToStruct.
func FromURLToStruct ¶
FromURLToStruct is a convenient function that combines FromURL and ToStruct. Accepts *url.URL and tries to convert the query string into a T structure.
func FromValuesToStruct ¶ added in v1.0.1
FromValuesToStruct is a convenient function that combines FromValues and ToStruct. Accepts url.Values and tries to convert the query string into a T structure.
func NormalizeSlicesNumbersIndexes ¶
NormalizeSlicesNumbersIndexes recursively checks whether the value is a set of numeric keys, and if so, converts it to a slice (anyList). For example, QueryMap{"0": "first", "1": "second"} => []any{"first", "second"}.
Types ¶
type QueryMap ¶
QueryMap is a map storing key-values from query-parameters. The value can be of one of the following types: string, []string, QueryMap, anyList.
func FromURL ¶
FromURL parses the *url.URL object and returns a QueryMap representing all its query parameters as a nested structure.
func FromValues ¶ added in v1.0.1
FromValues parses the url.Values object and returns a QueryMap representing all its query parameters as a nested structure.