callsite

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

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

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutTypeLine = "line"
	OutTypeJson = "json"
)

Variables

This section is empty.

Functions

func Files

func Files(path string, excludeTests bool) []string

func NewJsonPrinter

func NewJsonPrinter(out io.Writer, css List) *jsonPrinter

func NewLinePrinter

func NewLinePrinter(out io.Writer, css List) *linePrinter

func PackageFromFile

func PackageFromFile(path string) string

func Packages

func Packages(path string, gopath string, recursivePackages bool) []string

Types

type Element

type Element struct {
	Caller data.Function `json:"caller"`
	Callee data.Function `json:"callee"`
}

type Error

type Error string
const (
	NotParsedError   Error = "not parsed"
	PkgNotFoundError Error = "pkg not found in callsites"
)

func (Error) Error

func (e Error) Error() string

type Finder

type Finder interface {
	Parse() error
	All() (List, error)
	Package(path string) (List, error)
}

type List

type List []Element

type Printer

type Printer interface {
	Print()
}

Jump to

Keyboard shortcuts

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