reader

package
v0.0.0-...-32d9607 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader is the information used to setup how the reader will run and the data to run inside the reader.

func New

func New() *Reader

New constructs a new reader.

func (*Reader) AddDir

func (r *Reader) AddDir(foldername string) *Reader

AddDir adds all the files in the given directory.

func (*Reader) AddDirRecursively

func (r *Reader) AddDirRecursively(dirname string) *Reader

AddDirRecursively adds all the files in the given directory and all the files in all children folders.

func (*Reader) AddFiles

func (r *Reader) AddFiles(filenames ...string) *Reader

AddFiles adds one or more new files to the reader to this configuration.

func (*Reader) AddSource

func (r *Reader) AddSource(filename string, source string) *Reader

AddSource adds a string of source code to read directly. The filename is used to identify this source code string.

func (*Reader) BasePath

func (r *Reader) BasePath() string

BasePath gets the base path to use while reading the data.

func (*Reader) Filenames

func (r *Reader) Filenames() []string

Filenames get the list of filenames that have been set to this reader and should be processed when started.

func (*Reader) FilterFilenames

func (r *Reader) FilterFilenames(matcher filter.Matcher) *Reader

FilterFilenames will remove all the filenames and paired sources which match the given handler. If the matcher returns true the file is removed.

func (*Reader) Read

func (r *Reader) Read() *data.Project

Read will perform the read of the data.

func (*Reader) SetBasePath

func (r *Reader) SetBasePath(basePath string) *Reader

SetBasePath is the base path to use while reading the data.

Jump to

Keyboard shortcuts

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