decoder

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JSONDecoder = New(encoding.DecodeJSON[[]byte])
)

Functions

This section is empty.

Types

type Decoder

type Decoder interface {
	DecodeResponse(resp io.ReadCloser, dst any) error
}

func New

func New(decoder func([]byte, any) error) Decoder

type SimpleDecoder

type SimpleDecoder struct {
	Decode func([]byte, any) error
}

func (*SimpleDecoder) DecodeResponse

func (d *SimpleDecoder) DecodeResponse(b io.ReadCloser, dst any) error

Jump to

Keyboard shortcuts

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