rename

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintRename added in v0.1.2

func PrintRename(engine *Engine, fromto FromTo)

func Run

func Run(args *Args) error

Types

type Args

type Args struct {
	Files       []string
	Expression  string
	NoAct       bool
	Verbose     bool
	Interactive bool
	Force       bool
	Copy        bool
}

func ParseArgs

func ParseArgs() *Args

type Engine

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

instruction, for now chaining expressions is not supported

func NewEngine

func NewEngine(expression string) (*Engine, error)

func (*Engine) Highlight added in v0.1.2

func (e *Engine) Highlight(src string) (string, string, error)

func (*Engine) Run

func (e *Engine) Run(src string) (string, error)

type FromTo

type FromTo struct {
	From string
	To   string
}

func GetReplacements

func GetReplacements(engine *Engine, args *Args) ([]FromTo, error)

Jump to

Keyboard shortcuts

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