subfs

package
v0.0.0-...-4dcfcdd Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package subfs contains as fs.FS that performs string substitutions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SubstitutingFS

type SubstitutingFS struct {
	fs.FS
	Replacer *strings.Replacer
}

SubstitutingFS performs string substitution on returned files. This is used to replace sentinel values in the userscript with dynamically generated values.

func (*SubstitutingFS) Open

func (f *SubstitutingFS) Open(path string) (fs.File, error)

Open implements fs.FS. It will read the contents of the requested file and invoke the configured Replacer.

Jump to

Keyboard shortcuts

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