static

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFS

func InitFS(localPath string)

InitFS initializes the global HybridFS singleton with the wiki's own static files directory as a primary filesystem and the embedded one as a fallback.

Types

type HybridFS

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

HybridFS is a filesystem that implements fs.FS. It can serve files from multiple filesystems, falling back on failures.

var FS HybridFS

FS serves all static files.

func (HybridFS) Open

func (f HybridFS) Open(name string) (fs.File, error)

Open tries to open the requested file using all filesystems provided. If neither succeeds, it returns the last error.

Jump to

Keyboard shortcuts

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