httpgzip

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: ISC Imports: 9 Imported by: 4

README

httpgzip

-- import "vimagination.zapto.org/httpgzip"

Package httpgzip is a simple wrapper around http.FileServer that looks for a compressed version of a file and serves that if the client requested compressed

content

Usage

func FileServer
func FileServer(root http.FileSystem, roots ...http.FileSystem) http.Handler

FileServer creates a wrapper around http.FileServer using the given http.FileSystem

Additional http.FileSystem's can be specified and will be turned into a Handler that checks each in order, stopping at the first

func FileServerWithHandler
func FileServerWithHandler(root http.FileSystem, handler http.Handler, roots ...http.FileSystem) http.Handler

FileServerWithHandler acts like FileServer, but allows a custom Handler instead of the http.FileSystem wrapped http.FileServer

Documentation

Overview

Package httpgzip is a simple wrapper around http.FileServer that looks for a compressed version of a file and serves that if the client requested compressed content

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileServer

func FileServer(root http.FileSystem, roots ...http.FileSystem) http.Handler

FileServer creates a wrapper around http.FileServer using the given http.FileSystem

Additional http.FileSystem's can be specified and will be turned into a Handler that checks each in order, stopping at the first

func FileServerWithHandler

func FileServerWithHandler(root http.FileSystem, handler http.Handler) http.Handler

FileServerWithHandler acts like FileServer, but allows a custom Handler instead of the http.FileSystem wrapped http.FileServer

Types

This section is empty.

Jump to

Keyboard shortcuts

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