assetsfs

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystem

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

FileSystem customized to load assets

func New

func New(embedFS embed.FS, assetPath string, logger log.Logger) *FileSystem

New initializes a new FileSystem. Quits on error

func (*FileSystem) Open

func (f *FileSystem) Open(original string) (http.File, error)

Open checks if assetPath is set and tries to load from there. Falls back to fs if that is not possible

Jump to

Keyboard shortcuts

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