Documentation
¶
Overview ¶
Package resource owns named package filesystems shared by compilation and invocation. Registering a named filesystem never creates an implicit default.
Index ¶
- type Store
- func (s *Store) Filesystem(name string) (fs.FS, bool)
- func (s *Store) Lookup(name string) (fs.FS, bool)
- func (s *Store) Open(reference string) (fs.File, error)
- func (s *Store) ReadFile(reference string) ([]byte, error)
- func (s *Store) Register(name string, source fs.FS) error
- func (s *Store) WithDefault(source fs.FS) (*Store, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Filesystem ¶ added in v0.3.0
Filesystem returns the registered filesystem for a namespace.
func (*Store) WithDefault ¶
WithDefault returns a source-local default view over the same named authority. Named Register/Lookup remain shared; registering a default on this view fails because its default was fixed at construction. The supplied FS must be immutable.
Click to show internal directories.
Click to hide internal directories.