type Index struct {
}
Index maps names registered by IANA to Encodings.
var (
// MIME is an index to map MIME names. It does not support aliases.
MIME *Index
// IANA is an index that supports all names and aliases using IANA names as
// the canonical identifier.
IANA *Index
)
▹ Example
func (x *Index) Get(name string) (encoding.Encoding, error)
Get returns an Encoding for IANA-registered names. Matching is case-insensitive.
func (x *Index) Name(e encoding.Encoding) (string, error)
Name reports the canonical name of the given Encoding. It will return an error if the e is not associated with a known encoding scheme.