bindataafero

package module
v0.0.0-...-9ea3a11 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 3 Imported by: ? 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.

README

go-bindata-afero

A bridge between go-bindata and Afero, converts go-bindata embedded data into a Afero Memory FS.

Usage

fs := bindataafero.MustNewBindataFs(Asset, AssetInfo, AssetDir)

You can also write assets to an existing Afero FS, see fs_test.go for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNewBindataFs

func MustNewBindataFs(assetFn AssetFn, assetInfoFn AssetInfoFn, assetDirFn AssetDirFn) afero.Fs

MustNewBindataFs creates a afero.Fs using specified assets. Errors will lead to panic.

func NewBindataFs

func NewBindataFs(assetFn AssetFn, assetInfoFn AssetInfoFn, assetDirFn AssetDirFn) (afero.Fs, error)

NewBindataFs creates a afero.Fs using specified assets. Errors may be returned.

func WriteAssetsInDirectory

func WriteAssetsInDirectory(fs afero.Fs, assetFn AssetFn, assetInfoFn AssetInfoFn, assetDirFn AssetDirFn, targetBaseDir, srcBaseDir, dirPath string) error

WriteAssetsInDirectory writes assets in `dirPath` to a afero.Fs directory `targetBaseDir`.

Types

type AssetDirFn

type AssetDirFn func(name string) ([]string, error)

type AssetFn

type AssetFn func(name string) ([]byte, error)

type AssetInfoFn

type AssetInfoFn func(name string) (os.FileInfo, error)

Jump to

Keyboard shortcuts

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