loader

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package loader has a data loading interface and various implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileLoader

func NewFileLoader(fSys fs.FileSystem) *fileLoader

NewFileLoader returns a new fileLoader.

Types

type Loader

type Loader interface {
	// Root returns the root location for this Loader.
	Root() string
	// New returns Loader located at newRoot.
	New(newRoot string) (Loader, error)
	// Load returns the bytes read from the location or an error.
	Load(location string) ([]byte, error)
}

Loader interface exposes methods to read bytes.

Jump to

Keyboard shortcuts

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