decoder

package module
v0.0.0-...-b43d8b8 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(mediaType string, body io.Reader, v interface{}) error

Decode by media type

func HTTPDecode

func HTTPDecode(r *http.Response, body io.Reader, v interface{}) error

HTTPDecode decode by MediaType

func MustRegister

func MustRegister(decoder Decoder, mediaTypes ...string)

MustRegister register decode or panic if duplicate

func Register

func Register(decoder Decoder, mediaTypes ...string) error

Register decoder by media type

Types

type Decoder

type Decoder func(r io.Reader, v interface{}) error

Decoder decode by reader

Jump to

Keyboard shortcuts

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