Documentation
¶
Overview ¶
Package mediatyper parses and formats HTTP media type strings of the form type/subtype+suffix; params. It is a port of the npm media-typer package using only the Go standard library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MediaType ¶
type MediaType struct {
// Type is the top-level type, e.g. "application".
Type string
// Subtype is the subtype without any suffix, e.g. "vnd.api".
Subtype string
// Suffix is the optional structured suffix without the "+", e.g. "json".
Suffix string
// Parameters holds media type parameters keyed by lower-case name.
Parameters map[string]string
}
MediaType represents a parsed media type.
Click to show internal directories.
Click to hide internal directories.