reviser

package
v2.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	StandardInput = "<standard-input>"
)

Variables

This section is empty.

Functions

func Execute

func Execute(projectName, filePath, localPkgPrefixes string, options ...Option) ([]byte, bool, error)

Execute is for revise imports and format the code

Types

type Option

type Option int

Option is an int alias for options

const (
	// OptionRemoveUnusedImports is an option to remove unused imports
	OptionRemoveUnusedImports Option = iota + 1

	// OptionUseAliasForVersionSuffix is an option to set explicit package name in imports
	OptionUseAliasForVersionSuffix

	// OptionFormat use to format the code
	OptionFormat
)

type Options

type Options []Option

Options is a slice of executing options

Jump to

Keyboard shortcuts

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