Documentation ¶
Index ¶
- Variables
- type Box
- type CombinedBox
- func (instance CombinedBox) Close() error
- func (instance CombinedBox) ForEach(predicate common.FilePredicate, callback func(common.FileInfo) error) error
- func (instance CombinedBox) Info(name string) (common.FileInfo, error)
- func (instance CombinedBox) Open(name string) (common.File, error)
- func (instance CombinedBox) With(box Box) CombinedBox
- type Iterable
- type OnFallbackToFsBoxFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // AllowFallbackToFsBox 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 ErrBoxIterationNotSupported = errors.New("box iteration not supported") )
View Source
var OnFallbackToFsBox_Default = func(packedBoxCandidateFilename string, bases []string, fsBox Box) error { if AllowFallbackToFsBox { return OnFallbackToFsBox_Warn(packedBoxCandidateFilename, bases, fsBox) } return OnFallbackToFsBox_Fail(packedBoxCandidateFilename, bases, fsBox) }
noinspection GoSnakeCaseUsage
View Source
var OnFallbackToFsBox_Fail = func(packedBoxCandidateFilename string, bases []string, fsBox Box) error { return common.NewPathError("openBox", packedBoxCandidateFilename, common.ErrDoesNotContainBox) }
noinspection GoSnakeCaseUsage
View Source
var OnFallbackToFsBox_Warn = func(packedBoxCandidateFilename string, bases []string, fsBox Box) error { log.With("candidate", packedBoxCandidateFilename). Warn("Candidate does not contain a packed box version. This could happen in development mode.") return nil }
noinspection GoSnakeCaseUsage
Functions ¶
This section is empty.
Types ¶
type Box ¶
type Box interface { io.Closer Open(name string) (common.File, error) Info(pathname string) (common.FileInfo, error) }
func OpenPackedBox ¶
type CombinedBox ¶
type CombinedBox []Box
func (CombinedBox) Close ¶
func (instance CombinedBox) Close() error
func (CombinedBox) ForEach ¶ added in v0.6.0
func (instance CombinedBox) ForEach(predicate common.FilePredicate, callback func(common.FileInfo) error) error
func (CombinedBox) With ¶
func (instance CombinedBox) With(box Box) CombinedBox
Click to show internal directories.
Click to hide internal directories.