collect

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapFactory

type MapFactory func(reserve bool) MapWriter

a function which returns a new writer reserve indicates whether to keep space for a comment key

type MapWriter

type MapWriter interface {
	// add the passed pair to the in-progress map
	// returns a new writer ( not guaranteed to be the original one )
	MapValue(key string, val any) MapWriter
	// return the implementation specific representation of a map
	GetMap() any
}

write to a map

type SequenceFactory

type SequenceFactory func(reserve bool) SequenceWriter

a function which returns a new writer reserve indicates whether to keep space for comments

type SequenceWriter

type SequenceWriter interface {
	// add the passed value to the in-progress sequence
	// returns a new writer ( not guaranteed to be the original one )
	// indices are guaranteed to increase by one each time
	// ( stating with 1 if reserve was true )
	// except for comments, which are written last at index 0
	IndexValue(idx int, val any) SequenceWriter
	// return the implementation specific representation of a sequence
	GetSequence() any
}

Directories

Path Synopsis
package orderedmap implements tell maps interface for ian coleman's ordered map implementation https://github.com/iancoleman/orderedmap
package orderedmap implements tell maps interface for ian coleman's ordered map implementation https://github.com/iancoleman/orderedmap

Jump to

Keyboard shortcuts

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