walk

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: BSD-3-Clause Imports: 11 Imported by: 17

Documentation

Overview

package walk provides methods for walking all in the records in a line-delimited JSON document.

Index

Constants

View Source
const CONTEXT_PATH string = "github.com/aaronland/go-jsonl#path"

Variables

This section is empty.

Functions

func IsEOFError added in v0.0.7

func IsEOFError(err error) bool

func IterateBucket added in v0.1.0

func IterateBucket(ctx context.Context, iter_opts *IterateOptions, bucket *blob.Bucket) iter.Seq2[*WalkRecord, error]

func IterateReader added in v0.0.23

func IterateReader(ctx context.Context, opts *IterateOptions, r io.Reader) iter.Seq2[*WalkRecord, error]

Types

type IterateOptions added in v0.0.23

type IterateOptions struct {
	ValidateJSON bool
	FormatJSON   bool
	QuerySet     *query.QuerySet
	IsBzip       bool
	Filter       WalkFilterFunc
}

type WalkError

type WalkError struct {
	Path       string
	LineNumber int
	Err        error
}

func (*WalkError) Error

func (e *WalkError) Error() string

func (*WalkError) String

func (e *WalkError) String() string

type WalkFilterFunc added in v0.0.11

type WalkFilterFunc func(context.Context, string) bool

type WalkRecord

type WalkRecord struct {
	Path             string
	LineNumber       int
	Body             []byte
	CompletedChannel chan bool
}

Jump to

Keyboard shortcuts

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