encoder

package
v2.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder[T any] struct {
	// contains filtered or unexported fields
}

Encoder can encode generic objects into various output formats.

func New

func New[T any](w io.Writer, output string) Encoder[T]

New initializes a new Encoder.

func (*Encoder[T]) Encode

func (e *Encoder[T]) Encode(objects ...T) error

Encode encodes the generic objects into the output specified during Encoder initialization.

Jump to

Keyboard shortcuts

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