inspect

package
v0.0.0-...-d6be617 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The relation between a usage and its definition.
	RelationKindDef = RelationKind("definition")

	// The relation between a definition and its references.
	RelationKindRef = RelationKind("reference")

	// The relation between an interface and its implementation.
	RelationKindImpl = RelationKind("implementation")

	// The relation between an implementation and its interface.
	RelationKindIface = RelationKind("interface")
)

Variables

View Source
var AllRelationKindStrings []string
View Source
var AllRelationKinds []RelationKind

Functions

This section is empty.

Types

type Relation

type Relation struct {
	file.Loc
	Kind RelationKind
	Pkg  string
	Name string
}

Relation represents a relationship between an identifier to some other part of the codebase.

type RelationKind

type RelationKind string

func RelationKindFromString

func RelationKindFromString(s string) (RelationKind, error)

func RelationKindsFromStrings

func RelationKindsFromStrings(relKindStrings []string) ([]RelationKind, error)

type RelationSlice

type RelationSlice []Relation

func (RelationSlice) Len

func (rs RelationSlice) Len() int

Len implements sort.Interface#Len

func (RelationSlice) Less

func (rs RelationSlice) Less(i, j int) bool

Less implements sort.Interface#Less

func (RelationSlice) Swap

func (rs RelationSlice) Swap(i, j int)

Swap implements sort.Interface#Swap

type Result

type Result struct {
	Name      string
	Type      string
	Relations []Relation
}

func Inspect

func Inspect(loc file.Loc, searchDir string, includeRelKinds []RelationKind) (*Result, error)

Jump to

Keyboard shortcuts

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