refdir

package
v0.0.0-...-878e830 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "vertfn",
	Doc:      "report vertical function ordering information",
	Run:      run,
	Flags:    flag.FlagSet{},
	Requires: []*analysis.Analyzer{inspect.Analyzer},
}
View Source
var RefOrder = map[RefKind]Direction{
	Func:     Down,
	Type:     Down,
	RecvType: Up,
	Value:    Down,
}

Functions

This section is empty.

Types

type ColorPrinter

type ColorPrinter struct {
	ColorError color.Color
	ColorInfo  color.Color
	ColorOk    color.Color
	Pass       *analysis.Pass
}

func (ColorPrinter) Error

func (c ColorPrinter) Error(p token.Pos, s string)

func (ColorPrinter) Flush

func (c ColorPrinter) Flush()

func (ColorPrinter) Info

func (c ColorPrinter) Info(p token.Pos, s string)

func (ColorPrinter) Ok

func (c ColorPrinter) Ok(p token.Pos, s string)

type Direction

type Direction string
const (
	Down   Direction = "down"
	Up     Direction = "up"
	Ignore Direction = "ignore"
)

type Printer

type Printer interface {
	Error(p token.Pos, s string)
	Info(p token.Pos, s string)
	Ok(p token.Pos, s string)
	Flush()
}

type RefKind

type RefKind string
const (
	Func     RefKind = "func"
	Type     RefKind = "type"
	RecvType RefKind = "recvtype"
	Value    RefKind = "value"
)

type SimplePrinter

type SimplePrinter struct {
	Pass *analysis.Pass
}

func (SimplePrinter) Error

func (c SimplePrinter) Error(p token.Pos, s string)

func (SimplePrinter) Flush

func (c SimplePrinter) Flush()

func (SimplePrinter) Info

func (c SimplePrinter) Info(p token.Pos, s string)

func (SimplePrinter) Ok

func (c SimplePrinter) Ok(p token.Pos, s string)

type SortedPrinter

type SortedPrinter struct {
	Printer Printer
	Pass    *analysis.Pass
	// contains filtered or unexported fields
}

SortedPrinter defers printin until Flush is called. Sorts print calls by line number of position.

func (*SortedPrinter) Error

func (c *SortedPrinter) Error(p token.Pos, s string)

func (*SortedPrinter) Flush

func (c *SortedPrinter) Flush()

func (*SortedPrinter) Info

func (c *SortedPrinter) Info(p token.Pos, s string)

func (*SortedPrinter) Ok

func (c *SortedPrinter) Ok(p token.Pos, s string)

type VerbosePrinter

type VerbosePrinter struct {
	Verbose bool
	Printer Printer
}

func (VerbosePrinter) Error

func (c VerbosePrinter) Error(p token.Pos, s string)

func (VerbosePrinter) Flush

func (c VerbosePrinter) Flush()

func (VerbosePrinter) Info

func (c VerbosePrinter) Info(p token.Pos, s string)

func (VerbosePrinter) Ok

func (c VerbosePrinter) Ok(p token.Pos, s string)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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