goimports

package
v1.0.0-alpha.13 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MidPath

func MidPath(outputdir, rootDir string) (string, error)

Types

type ImportSpec

type ImportSpec struct {
	Path    string
	Aliased bool
	Name    string
}

func (ImportSpec) String

func (spec ImportSpec) String() string

type Imports

type Imports struct {
	Specs []ImportSpec
	Used  map[string]bool // keyed on import path
	// contains filtered or unexported fields
}

func NewImports

func NewImports(
	reserved []ImportSpec,
	bundleMap []loader.BundleMap,

) Imports

func (*Imports) AddModule

func (i *Imports) AddModule(module string, modulePath, midPath string) (name string)

func (*Imports) AddPath

func (i *Imports) AddPath(path string) (name string)

func (*Imports) AddSpec

func (i *Imports) AddSpec(spec ImportSpec) (name string)

func (*Imports) ByName

func (i *Imports) ByName(name string) (spec ImportSpec, ok bool)

func (*Imports) ByPath

func (i *Imports) ByPath(path string) (spec ImportSpec, ok bool)

Jump to

Keyboard shortcuts

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