...

Package httputil

import "github.com/shurcooL/httpfs/httputil"
Overview
Index

Overview ▾

Package httputil implements HTTP utility functions for http.FileSystem.

type FileHandler

FileHandler is an http.Handler that serves the root of File, which is expected to be a normal file (not a directory).

type FileHandler struct {
    File http.FileSystem
}

func (FileHandler) ServeHTTP

func (h FileHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)