fileembed

package
v0.0.0-...-eb76b61 Latest Latest
Warning

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

Go to latest
Published: May 23, 2013 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Files

type Files struct {
	// Optional environment variable key to override
	OverrideEnv string

	// Optional fallback directory to check, if not in memory.
	DirFallback string

	// SlurpToMemory controls whether on first access the file is
	// slurped into memory.  It's intended for use with DirFallback.
	SlurpToMemory bool
	// contains filtered or unexported fields
}

func (*Files) Add

func (f *Files) Add(filename string, size int64, o Opener, modtime time.Time)

Add adds a file to the file set.

func (*Files) Open

func (f *Files) Open(filename string) (hf http.File, err error)

type Opener

type Opener interface {
	Open() (io.Reader, error)
}

type String

type String string

func (String) Open

func (s String) Open() (io.Reader, error)

type ZlibCompressed

type ZlibCompressed string

ZlibCompressed is used to store a compressed file

func (ZlibCompressed) Open

func (zb ZlibCompressed) Open() (io.Reader, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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