replacer

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RootCLI

func RootCLI() *cobra.Command

RootCLI main cli command

Types

type ReplacableKV

type ReplacableKV struct {
	KV     string
	Quotes bool
}

ReplacableKV hold key and value key represent target template to be replaced value represent next value

type Replacer

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

Replacer struct object for replace inputPath => input file path dryRun run without saving result

func NewReplacer

func NewReplacer(inputPath, outputPath string, dryRun bool) *Replacer

NewReplacer create new Replacer

func (*Replacer) Run

func (rep *Replacer) Run(kv []ReplacableKV, verbose bool) error

Run running replace process will replace {{templateName}} format

Jump to

Keyboard shortcuts

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