httpfs

package module
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: BSD-3-Clause Imports: 8 Imported by: 12

README

httpfs

Package httpfs implements http.FileSystem on top of a map[string]string.

Installation

$ go get [-u] modernc.org/httpfs

Documentation: godoc.org/modernc.org/httpfs

Documentation

Overview

Package httpfs implements http.FileSystem on top of a map[string]string.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystem

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

FileSystem is an implementation of http.FileSystem.

func NewFileSystem

func NewFileSystem(files map[string]string, modTime time.Time) *FileSystem

NewFileSystem returns a new FileSystem containing http.Files from the files argument. The map keys must be rooted unix slash-separated paths. The file content is whatever the associated map value is. All files will have their modTime set to modTime.

func (*FileSystem) Open

func (f *FileSystem) Open(name string) (fi http.File, err error)

Open implements http.FileSystem.

Jump to

Keyboard shortcuts

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