utils

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrCollector

type ErrCollector struct {
	Errs []errors.StaticError
}

ErrCollector is a struct for accumulating warnings / errors from the linter. It is slightly more convenient and more clear than passing pointers to slices around.

func (*ErrCollector) Collect

func (ec *ErrCollector) Collect(err errors.StaticError)

Collect adds an error to the list

func (*ErrCollector) StaticErr

func (ec *ErrCollector) StaticErr(msg string, loc *ast.LocationRange)

StaticErr constructs a static error from msg and loc and adds it to the list.

Jump to

Keyboard shortcuts

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