porting

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Port

func Port(paths []string, config *Config) (err error)

The main entry point for porting

Loads and type checks the packages and all dependencies for the given paths if any type checking failures occur in any packages, those packages will be attempted to be ported

Config must not be nil

Types

type Config

type Config struct {
	// Environment according to 'go env'
	//
	// Must not be nil
	GoEnv map[string]string

	// Build tags used for determining what files to use
	//
	BuildTags []string

	// Cache directory
	Cache string

	// Directory for importing in modules
	//
	ImportDir string

	// Dry Run
	//
	DryRun bool

	// Use VCS when importing modules
	//
	UseVCS bool

	// Verbose patch instructions
	//
	Verbose bool

	// Explicitly defined handlers for packages
	//
	Directives map[string]*direct.PackageDirective
}

type PatchError

type PatchError struct {
	PkgPath string

	Reason string

	Suggestion string
}

func (PatchError) Error

func (e PatchError) Error() string

Jump to

Keyboard shortcuts

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