advice

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExcludePaths

func GetExcludePaths(packages map[string]*parser.Package) []*regexp.Regexp

GetExcludePaths returns the paths to be excluded

Types

type Advice

type Advice struct {
	// contains filtered or unexported fields
}

Advice struct

func (*Advice) GetAdviceCall

func (a *Advice) GetAdviceCall(currentPkg string, imports map[string]string) string

GetAdviceCall returns the advice call

func (*Advice) HasBefore

func (a *Advice) HasBefore() bool

HasBefore return if before function is implemented

func (*Advice) HasReturning

func (a *Advice) HasReturning() bool

HasReturning return if returning function is implemented

func (*Advice) Imports

func (a *Advice) Imports() []string

Imports returns the list of imports

func (*Advice) Match

func (a *Advice) Match(text string) bool

Match return if the given input matches with the advice

func (*Advice) Name

func (a *Advice) Name() string

Name return the function name

func (*Advice) Pkg

func (a *Advice) Pkg() string

Pkg return the package

type Advices

type Advices struct {
	// contains filtered or unexported fields
}

Advices struct

func GetAdvices

func GetAdvices(packages map[string]*parser.Package) *Advices

GetAdvices return the list of advices (aspects)

func (*Advices) Add

func (a *Advices) Add(def *Advice)

Add add a new advice

func (*Advices) List

func (a *Advices) List() []*Advice

List return the list of advices

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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