Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains(slice interface{}, value interface{}) bool
Contains check if a slice contains a value.
func SliceEqual ¶
func SliceEqual(first interface{}, second interface{}) bool
SliceEqual check if two generic slices are the same.
Types ¶
type HeaderValue ¶
HeaderValue represent a value and its quality value (priority) in a multi-values HTTP header.
func ParseMultiValuesHeader ¶
func ParseMultiValuesHeader(header string) []HeaderValue
ParseMultiValuesHeader parses multi-values HTTP headers, taking the quality values into account. The result is a slice of values sorted according to the order of priority.
See: https://developer.mozilla.org/en-US/docs/Glossary/Quality_values
For the following header:
"text/html,text/*;q=0.5,*/*;q=0.7"
then
[{text/html 1} {*/* 0.7} {text/* 0.5}]
Click to show internal directories.
Click to hide internal directories.