rename

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT, BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Overview

Package rename contains the implementation of the 'gorename' command whose main function is in golang.org/x/tools/cmd/gorename. See the Usage constant for the command documentation.

Index

Constants

View Source
const Usage = `` /* 2943-byte string literal not displayed */

Variables

View Source
var (
	// Force enables patching of the source files even if conflicts were reported.
	// The resulting program may be ill-formed.
	// It may even cause gorename to crash.  TODO(adonovan): fix that.
	Force bool

	// Diff causes the tool to display diffs instead of rewriting files.
	Diff bool

	// DiffCmd specifies the diff command used by the -d feature.
	// (The command must accept a -u flag and two filename arguments.)
	DiffCmd = "diff"

	// ConflictError is returned by Main when it aborts the renaming due to conflicts.
	// (It is distinguished because the interesting errors are the conflicts themselves.)
	ConflictError = errors.New("renaming aborted due to conflicts")

	// Verbose enables extra logging.
	Verbose bool
)
View Source
var Stdout io.Writer = os.Stdout

Functions

func Main

func Main(ctxt *build.Context, froms, tos []string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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