tmplfs

package
v0.0.0-...-d30abd5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

package tmplfs

import "github.com/zeebo/rothko/internal/tmplfs"

package tmplfs wraps an http.FileSystem to make html files html/templates.

Usage

type FS
type FS struct {
}

FS wraps a http.FileSystem to add templates to files that end in .html.

func New
func New(fs http.FileSystem) *FS

New constructs a FS around the http.FileSystem. It implements http.Handler.

func (*FS) ServeHTTP
func (s *FS) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP conforms to the http.Handler interface.

Documentation

Overview

package tmplfs wraps an http.FileSystem to make html files html/templates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

FS wraps a http.FileSystem to add templates to files that end in .html.

func New

func New(fs http.FileSystem) *FS

New constructs a FS around the http.FileSystem. It implements http.Handler.

func (*FS) ServeHTTP

func (s *FS) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP conforms to the http.Handler interface.

Jump to

Keyboard shortcuts

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