sourcestest

package
v3.82.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: AGPL-3.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 ErrReporter

type ErrReporter struct{}

ErrReporter implements UnitReporter and ChunkReporter but always returns an error.

func (ErrReporter) ChunkErr

func (ErrReporter) ChunkErr(context.Context, error) error

func (ErrReporter) ChunkOk

func (ErrReporter) UnitErr

func (ErrReporter) UnitOk

type TestReporter

type TestReporter struct {
	Units     []sources.SourceUnit
	UnitErrs  []error
	Chunks    []sources.Chunk
	ChunkErrs []error
}

TestReporter is a helper struct that implements both UnitReporter and ChunkReporter by simply recording the values passed in the methods.

func (*TestReporter) ChunkErr

func (t *TestReporter) ChunkErr(_ context.Context, err error) error

func (*TestReporter) ChunkOk

func (t *TestReporter) ChunkOk(_ context.Context, chunk sources.Chunk) error

func (*TestReporter) UnitErr

func (t *TestReporter) UnitErr(_ context.Context, err error) error

func (*TestReporter) UnitOk

func (t *TestReporter) UnitOk(_ context.Context, unit sources.SourceUnit) error

Jump to

Keyboard shortcuts

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