fs

package
v0.0.0-...-b3b9b66 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

fs provides the implementation of stringfs. In most cases the stringfs command can be used to generate the code that calls this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(fs http.FileSystem, l *log.Logger) ([]byte, error)

Create converts a net/http FileSystem to a byte slice. If a logger is provided it is used to log informational messages.

func CreateString

func CreateString(fs http.FileSystem, l *log.Logger) (string, error)

CreateString converts a net/http Filsystem into a string. If a logger is provided it is used to log informational messages.

func Must

func Must(fs http.FileSystem, err error) http.FileSystem

Must is a helper function that can be used to wrap a call to New. It panics if the returned error is non-nil.

func New

func New(str string) (http.FileSystem, error)

New returns the contents of str as a net/http FileSystem.

Types

This section is empty.

Jump to

Keyboard shortcuts

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