replacer

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Replacer

type Replacer struct {
	// contains filtered or unexported fields
}

func New

func New(
	git *git.Repository,
	root string,
	filesCmd string,
	templates map[string]string,
) Replacer

func NewMocked

func NewMocked(files []string, templates map[string]string) Replacer

func (Replacer) Cached added in v2.0.10

func (r Replacer) Cached(key string) bool

func (Replacer) Discover

func (r Replacer) Discover(source string, filter *filter.Filter) error

Discover finds patterns in `source` and caches the results.

func (Replacer) Empty

func (r Replacer) Empty(key string) bool

func (Replacer) Files

func (r Replacer) Files(template string, filter *filter.Filter) ([]string, error)

func (Replacer) HasEmpty added in v2.0.14

func (r Replacer) HasEmpty() bool

func (Replacer) ReplaceAndSplit

func (r Replacer) ReplaceAndSplit(command string, maxlen int) ([]string, []string)

Jump to

Keyboard shortcuts

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