redirect

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedirectWithConfig

func NewRedirectWithConfig(conf *Config) (http.Handler, error)

Types

type Config

type Config struct {
	Code     int
	Location string
}

type Redirect

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

func NewRedirect

func NewRedirect(code int, location template.Format) *Redirect

func (*Redirect) ServeHTTP

func (h *Redirect) ServeHTTP(rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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