server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package server inclues functions for serving content.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPath

func CheckPath(path string) bool

CheckPath returns true if the given path is ok, which means the path contains no "." or ".." path elements.

func CleanPath

func CleanPath(str string) string

func ServeFile

func ServeFile(w http.ResponseWriter, r *http.Request, fs afero.Fs, p string, modtime time.Time, download bool, errorHandler func(w http.ResponseWriter, r *http.Request, err error) error)

func TrimTrailingForwardSlash

func TrimTrailingForwardSlash(str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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