fserve

package
v0.0.0-...-40ef913 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Errs = struct {
	ErrNotFile      error // 不是文件
	ErrOpenFailed   error // 打开失败
	ErrAccessDenied error // 拒绝访问
}{
	errors.New("not a file"),
	errors.New("open failed"),
	errors.New("access denied"),
}

Errs 预定义错误

Functions

This section is empty.

Types

type Fserve

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

Fserve 文件服务

func New

func New(root string, debug bool) (f *Fserve)

New 返回一个文件服务

func (*Fserve) Serve

func (f *Fserve) Serve(w http.ResponseWriter, r *http.Request) (err error)

Serve 服务

Jump to

Keyboard shortcuts

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