assetfs

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetFileSystem

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

AssetFileSystem AssetFS based on FileSystem

func (*AssetFileSystem) Asset

func (fs *AssetFileSystem) Asset(name string) ([]byte, error)

Asset get content with name from assetfs

func (*AssetFileSystem) Compile

func (fs *AssetFileSystem) Compile() error

Compile compile assetfs

func (*AssetFileSystem) Glob

func (fs *AssetFileSystem) Glob(pattern string) (matches []string, err error)

Glob list matched files from assetfs

func (*AssetFileSystem) NameSpace

func (fs *AssetFileSystem) NameSpace(nameSpace string) Interface

NameSpace return namespaced filesystem

func (*AssetFileSystem) PrependPath

func (fs *AssetFileSystem) PrependPath(pth string) error

PrependPath prepend path to view paths

func (*AssetFileSystem) RegisterPath

func (fs *AssetFileSystem) RegisterPath(pth string) error

RegisterPath register view paths

type Interface

type Interface interface {
	PrependPath(path string) error
	RegisterPath(path string) error
	Asset(name string) ([]byte, error)
	Glob(pattern string) (matches []string, err error)
	Compile() error

	NameSpace(nameSpace string) Interface
}

Interface assetfs interface

var AssetFS Interface = &AssetFileSystem{}

AssetFS default assetfs

Jump to

Keyboard shortcuts

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