Version: v0.0.0-...-9530605 Latest Latest

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

Go to latest
Published: Oct 15, 2018 License: BSD-2-Clause Imports: 2 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type ConsoleReporter

type ConsoleReporter struct{}

ConsoleReporter is used to print in the console the information found during the scan

func (*ConsoleReporter) Generate

func (cr *ConsoleReporter) Generate(results []PackageResult) interface{}

Generate prints the information provided

type DefaultFileResult

type DefaultFileResult struct {
	// contains filtered or unexported fields

DefaultFileResult is the file result holder by default

func NewDefaultFileResult

func NewDefaultFileResult(name string) *DefaultFileResult

NewDefaultFileResult is the recommended way to create a DefaultFileResult

func (*DefaultFileResult) AddResult

func (dfr *DefaultFileResult) AddResult(result Result)

AddResult adds a new result to the slice of results

func (*DefaultFileResult) GetFilepath

func (dfr *DefaultFileResult) GetFilepath() string

GetFilepath returns the filepath to which the errors belong

func (*DefaultFileResult) GetResults

func (dfr *DefaultFileResult) GetResults() []Result

GetResults returns the Results from the file

type DefaultPackageResult

type DefaultPackageResult struct {
	// contains filtered or unexported fields

DefaultPackageResult is the package result holder by default

func NewDefaultPackageResult

func NewDefaultPackageResult(name string, fileResults []FileResult) *DefaultPackageResult

NewDefaultPackageResult is the recommended way to create a DefaultPackageResult

func (*DefaultPackageResult) GetFileResults

func (dpr *DefaultPackageResult) GetFileResults() []FileResult

GetFileResults returns the FileResults of the package

func (*DefaultPackageResult) GetPackagename

func (dpr *DefaultPackageResult) GetPackagename() string

GetPackagename returns the package name

type Error

type Error struct {
	// contains filtered or unexported fields

Error implements the Result interface

func NewError

func NewError(location, message string) *Error

NewError is the recommended way to create an Error

func (*Error) Location

func (e *Error) Location() string

Location is to obtain the location of the Error

func (*Error) Message

func (e *Error) Message() string

Message is to obtain the message of the Error

type FileResult

type FileResult interface {
	GetFilepath() string
	GetResults() []Result

FileResult is the interface to hold all the Results regarding a single file

type Issue

type Issue struct {
	// contains filtered or unexported fields

Issue is used to send messages containing information abour a problem that has been found

func NewIssue

func NewIssue(msg string, pos token.Pos) *Issue

NewIssue is the standard way to create a new instance of Issue

func (*Issue) Position

func (i *Issue) Position() token.Pos

Position returns the offset in the file where the problem was detected

func (*Issue) String

func (i *Issue) String() string

String is the method to get the string information of the message

type Message

type Message interface {
	String() string
	Position() token.Pos

Message defined how the information regarding a message should be reported

type PackageResult

type PackageResult interface {
	GetPackagename() string
	GetFileResults() []FileResult

PackageResult is the interface to hold all the FileResults regarding a single package

type Reporter

type Reporter interface {
	Generate([]PackageResult) interface{}

Reporter is used to compile and generate the information found during the scan

type Result

type Result interface {
	Location() string
	Message() string

Result is the interface used to provide the information regarding issues found

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL