goxr

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnFallbackToFsBox_Default

func OnFallbackToFsBox_Default(packedBoxCandidateFilename string, bases []string, fsBox Box) error

noinspection GoSnakeCaseUsage

func OnFallbackToFsBox_Fail

func OnFallbackToFsBox_Fail(packedBoxCandidateFilename string, bases []string, fsBox Box) error

noinspection GoSnakeCaseUsage

func OnFallbackToFsBox_Warn

func OnFallbackToFsBox_Warn(packedBoxCandidateFilename string, bases []string, fsBox Box) error

noinspection GoSnakeCaseUsage

Types

type Box

type Box interface {
	io.Closer
	Open(name string) (common.File, error)
	Info(pathname string) (os.FileInfo, error)
}

func OpenBox

func OpenBox(base ...string) (Box, error)

func OpenBoxBy

func OpenBoxBy(packedBoxCandidateFilename string, base ...string) (Box, error)

func OpenPackedBox

func OpenPackedBox() (Box, error)

type CombinedBox

type CombinedBox []Box

func (CombinedBox) Close

func (instance CombinedBox) Close() error

func (CombinedBox) Info

func (instance CombinedBox) Info(name string) (os.FileInfo, error)

func (CombinedBox) Open

func (instance CombinedBox) Open(name string) (common.File, error)

func (CombinedBox) With

func (instance CombinedBox) With(box Box) CombinedBox

type OnFallbackToFsBoxFunc

type OnFallbackToFsBoxFunc func(packedBoxCandidateFilename string, bases []string, fsBox Box) error
var (
	// This variable could easily set while build time using:
	// go build -ldflags="-X github.com/echocat/goxr.AllowFallbackToFsBox=false" .
	// This is useful in case for behave differently for build versions of you application
	AllowFallbackToFsBox                       = true
	OnFallbackToFsBox    OnFallbackToFsBoxFunc = OnFallbackToFsBox_Default
)

Directories

Path Synopsis
box
fs

Jump to

Keyboard shortcuts

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