json

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter struct {
	// contains filtered or unexported fields
}

func New

func New(fieldNames []string, w io.Writer) *Formatter

func (*Formatter) Flush

func (f *Formatter) Flush() error

Flush writes the JSON encoding to the io.Writer. On success the internal map is cleared.

func (*Formatter) WriteRow

func (f *Formatter) WriteRow(vals ...any) error

WriteRow adds a new entry to the internal map. Vals must be in the same order then the fieldNames that were passed when NewFormatter was called.

Jump to

Keyboard shortcuts

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