replace

package
v1.0.1-0...-4125974 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Replace

func Replace(opts Options) (err error)

Types

type Engine

type Engine interface {
	Replace(content string, replacements map[string]interface{}) (replaced string, err error)
}

type EngineType

type EngineType int
const (
	Golang EngineType = iota
	Jinja2
)

func (EngineType) String

func (e EngineType) String() string

type FileNameRenamer

type FileNameRenamer func(string) string

type Options

type Options struct {
	Engine          EngineType
	Directory       string
	Include         []string
	Exclude         []string
	Replacements    map[string]interface{}
	FileNameRenamer FileNameRenamer
}

Jump to

Keyboard shortcuts

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