interfacer

package
Version: v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: MIT, BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckArgs

func CheckArgs(args []string, onWarns func(string, []Warn)) error

CheckArgs checks the packages specified by their import paths in args. It will call the onWarns function as each package is processed, passing its import path and the warnings found. Returns an error, if any.

func CheckArgsOutput

func CheckArgsOutput(args []string, w io.Writer, verbose bool) error

CheckArgsOutput is like CheckArgs, but intended for human-readable text output.

func FromScope

func FromScope(scope *types.Scope) (ifaces, funcs map[string]string)

Types

type Warn

type Warn struct {
	Pos     token.Position
	Name    string
	NewType string
}

Warn is an interfacer warning suggesting a better type for a function parameter.

func CheckArgsList

func CheckArgsList(args []string) (all []Warn, err error)

CheckArgsList is like CheckArgs, but returning a list of all the warnings instead.

func (Warn) String

func (w Warn) String() string

Directories

Path Synopsis
cmd
generate
std
internal

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