splitter

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericOutputter

type GenericOutputter[T interface{}] struct {
	// contains filtered or unexported fields
}

GenericOutputter is a structure that defines a generic transformer and a generic callback.

func NewGenericOutputter

func NewGenericOutputter[T interface{}](
	genericSplitter func(*tzap.Tzap) []T,
	genericCallback func(int, *tzap.Tzap, T) *tzap.Tzap,
) GenericOutputter[T]

NewGenericOutputter creates a new GenericOutputter with the provided parameters.

func (GenericOutputter[T]) GenericSplitter

func (y GenericOutputter[T]) GenericSplitter(t *tzap.Tzap) *tzap.Tzap

GenericSplitter takes a tzap.Tzap and applies the transformer and callback provided from the GenericOutputter. It returns an updated tzap.Tzap with data containing the children.

Jump to

Keyboard shortcuts

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