headers

package
v0.16.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEncoding = "iso-8859-1"

Variables

This section is empty.

Functions

func CharsetOf

func CharsetOf(str string) string

CharsetOf returns a charset parameter value, returning DefaultEncoding in case not presented

func ParamOf

func ParamOf(str, key string) string

ParamOf is an alias to ParamOfOr, except no `or`-parameter is passed - empty string will be returned in case not found.

func ParamOfOr

func ParamOfOr(str, key, or string) string

ParamOfOr looks for a parameter in a value, and if found, returns a parameter value. In case parameter is not found, `or` is returned

func QualityOf

func QualityOf(str string) int

QualityOf simply returns a value of quality-parameter as an uint8. If not presented or is not a valid integer, 9 is returned

func ValueOf

func ValueOf(str string) string

ValueOf returns a value until first semicolon is met. Even if the value after semicolon is not a parameter, it will anyway be counted as a parameter

Types

type Header = keyvalue.Pair

type Headers

type Headers = *keyvalue.Storage

func New added in v0.15.0

func New() Headers

func NewFromMap added in v0.15.0

func NewFromMap(m map[string][]string) Headers

func NewPrealloc added in v0.15.0

func NewPrealloc(n int) Headers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL