Documentation ¶
Overview ¶
Package loader is about loading files from either the filesystem or through https requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFilesystems ¶
CreateFilesystems creates the correct filesystem map for the current OS
Types ¶
type SourceData ¶
SourceData wraps a source file; data and filename.
func Load ¶
func Load( logger logrus.FieldLogger, filesystems map[string]afero.Fs, moduleSpecifier *url.URL, originalModuleSpecifier string, ) (*SourceData, error)
Load loads the provided moduleSpecifier from the given filesystems which are map of afero.Fs for a given scheme which is they key of the map. If the scheme is https then a request will be made if the files is not found in the map and written to the map.
func ReadSource ¶
func ReadSource( logger logrus.FieldLogger, src, pwd string, filesystems map[string]afero.Fs, stdin io.Reader, ) (*SourceData, error)
ReadSource Reads a source file from any supported destination.
Click to show internal directories.
Click to hide internal directories.