static

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const INDEX = "index.html"

Variables

This section is empty.

Functions

func LocalFile

func LocalFile(root string, indexes bool) *localFileSystem

func New added in v0.2.3

func New(urlPrefix string, fs ServeFileSystem) gin.HandlerFunc

New Static returns a middleware handler that serves static files in the given directory.

func NewRoot added in v0.2.3

func NewRoot(urlPrefix, root string) gin.HandlerFunc

Types

type ServeFileSystem

type ServeFileSystem interface {
	http.FileSystem
	Exists(prefix string, path string) bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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