dist

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion added in v1.9.4

func GetVersion() string

GetVersion returns version of the packed assets

Types

type DebugAssets

type DebugAssets struct {
	Dir     string // Dir is a directory location of asset files
	Default string // Default is the file to serve if file is not found.
}

DebugAssets serves assets via a specified directory

func (*DebugAssets) Handler

func (d *DebugAssets) Handler() http.Handler

Handler is an http.FileServer for the Dir

type Dir

type Dir struct {
	Default string
	// contains filtered or unexported fields
}

Dir functions like http.Dir except returns the content of a default file if not found.

func NewDir

func NewDir(dir, def string) Dir

NewDir constructs a Dir with a default file

func (Dir) Open

func (d Dir) Open(name string) (http.File, error)

Open will return the file in the dir if it exists, or, the Default file otherwise.

Jump to

Keyboard shortcuts

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