converter

package
v0.0.0-...-5f6adb7 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2018 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Complete

func Complete(src string, pos token.Pos, conf *Config) ([]string, int, int)

func InspectIdent

func InspectIdent(src string, pos token.Pos, conf *Config) (doc, query string)

InspectIdent shows a document or a query for go doc command for the identifier at pos.

func SetLGOImporter

func SetLGOImporter(im types.Importer)

func SetPackageArchiveInstaller

func SetPackageArchiveInstaller(i PackageArchiveInstaller)

Types

type Config

type Config struct {
	Olds         []types.Object
	OldImports   []*types.PkgName
	DefPrefix    string
	RefPrefix    string
	LgoPkgPath   string
	AutoExitCode bool
	RegisterVars bool
}

type ConvertResult

type ConvertResult struct {
	Src     string
	Pkg     *types.Package
	Checker *types.Checker
	Imports []*types.PkgName
	// A list of package paths imported in the final Src.
	FinalDeps []string

	Err error
}

func Convert

func Convert(src string, conf *Config) *ConvertResult

type ErrorList

type ErrorList []error

ErrorList is a list of *Errors. The zero value for an ErrorList is an empty ErrorList ready to use.

func (*ErrorList) Add

func (p *ErrorList) Add(err error)

Add adds an Error with given position and error message to an ErrorList.

func (ErrorList) Error

func (p ErrorList) Error() string

An ErrorList implements the error interface.

type PackageArchiveInstaller

type PackageArchiveInstaller interface {
	Install(pkgs []string) error
}

Jump to

Keyboard shortcuts

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