index

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	// contains filtered or unexported fields
}

Index represents an index of a Go package's arrangeable declarations.

func New

func New(pkg *ast.Package) Index

New returns an index for the given Go package.

func (Index) Sort

func (i Index) Sort(decls []ast.Decl) []int

Sort returns the indices of the given declarations, sorted according to the given index.

func (Index) Sorted

func (i Index) Sorted(decls []ast.Decl) bool

Sorted checks whether the given declarations are sorted according to the given index.

Jump to

Keyboard shortcuts

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