loadertest

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2018 License: Apache-2.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 FakeLoader

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

FakeLoader encapsulates the delegate Loader and the fake file system.

func NewFakeLoader

func NewFakeLoader(initialDir string) FakeLoader

NewFakeLoader returns a Loader that delegates calls, and encapsulates a fake file system that the Loader reads from. "initialDir" parameter must be an full, absolute directory (trailing slash doesn't matter).

func (FakeLoader) AddDirectory

func (f FakeLoader) AddDirectory(fullDirPath string, mode os.FileMode) error

Adds a fake directory to the file system.

func (FakeLoader) AddFile

func (f FakeLoader) AddFile(fullFilePath string, content []byte) error

Adds a fake file to the file system.

func (FakeLoader) Load

func (f FakeLoader) Load(location string) ([]byte, error)

func (FakeLoader) New

func (f FakeLoader) New(newRoot string) (loader.Loader, error)

func (FakeLoader) Root

func (f FakeLoader) Root() string

Jump to

Keyboard shortcuts

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