fstest

package
v1.13.7 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir(name string, entries ...http.File) http.File

Dir creates a directory http.File and its entry can be File(name, data) or Dir(name, entries).

func FS

func FS(entries ...http.File) http.FileSystem

FS creates a file system for testing. An entry can be File(name, data) or Dir(name, entries).

func File

func File(name, data string) http.File

Dir creates a file http.File and its content is `data`.

func SingleFile

func SingleFile(path, data string) http.FileSystem

Single creates a file system that only contains a signle file (but it may not in the root directory).

Types

This section is empty.

Jump to

Keyboard shortcuts

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