assets

package
v0.0.0-...-6801f60 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PlaceholderFileName is the name of the file that is used to populate the directory structure of the embedded assets.
	PlaceholderFileName = "placeholder"
)

Variables

This section is empty.

Functions

func OpenFile

func OpenFile(filename string) (iofs.File, error)

func ReadDir

func ReadDir(dirname string) ([]iofs.DirEntry, error)

func ReadFileBytes

func ReadFileBytes(filename string) ([]byte, error)

ReadFileBytes reads and returns bytes from the given file in this package's embedded assets. Filenames should use forward slashes, not `filepath.Join()`, because go:embed requires '/'.

Types

type AssetsFS

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

func NewAssetsFS

func NewAssetsFS() *AssetsFS

func (*AssetsFS) ReadDir

func (a *AssetsFS) ReadDir(name string) ([]iofs.DirEntry, error)

Jump to

Keyboard shortcuts

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