ctxfs

package
v0.156.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile added in v0.149.0

func ReadFile(fs afero.Fs, filePath string) ([]byte, error)

func RuntimeFsFrom

func RuntimeFsFrom(ctx context.Context) afero.Fs

RuntimeFsFrom extracts the filesystem used to access the filesystem from ctx. It will be used by //os.file and similar functions. TODO: Actually use it.

func RuntimeFsOnto

func RuntimeFsOnto(ctx context.Context, runtimeFs afero.Fs) context.Context

RuntimeFsOnto returns a new Context with runtimeFs added to ctx.

func SetDefaultFs

func SetDefaultFs(fs afero.Fs)

Sets the default Fs to be returned from SourceFsFrom and RuntimeFsFrom.

func SourceFsFrom

func SourceFsFrom(ctx context.Context) afero.Fs

SourceFsFrom extracts the filesystem used for import resolution from ctx.

func SourceFsOnto

func SourceFsOnto(ctx context.Context, sourceFs afero.Fs) context.Context

SourceFsOnto returns a new Context with sourceFs added to ctx.

Types

This section is empty.

Jump to

Keyboard shortcuts

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