server

package
v0.0.0-...-643e065 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is built-in http server address

func New

func New(dstDir string) *Server

New create new server on dstDir

func (*Server) GetPrefix

func (s *Server) GetPrefix() string

GetPrefix get prefix

func (*Server) Run

func (s *Server) Run(addr string)

Run run http server on addr

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(rw http.ResponseWriter, r *http.Request)

ServeHTTP implement http.Handler

func (*Server) SetPrefix

func (s *Server) SetPrefix(prefix string)

SetPrefix set prefix to trim url

Jump to

Keyboard shortcuts

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