interfacer

package module
v0.0.0-...-01c2de0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2015 License: BSD-3-Clause Imports: 13 Imported by: 0

README

interfacer

Build Status

A code checker that suggests interface types. In other words, it warns about the usage of types that are more specific than necessary.

go get github.com/mvdan/interfacer/cmd/interfacer
Usage
func ProcessInput(f *os.File) error {
        b := make([]byte, 64)
        if _, err := f.Read(b); err != nil {
                return err
        }
        // process b
        return nil
}
$ interfacer ./...
foo.go:10: f can be io.Reader

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckArgs

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

func FromScope

func FromScope(scope *types.Scope, all bool) (map[string]string, map[string]string)

Types

type ByAlph

type ByAlph []string

func (ByAlph) Len

func (l ByAlph) Len() int

func (ByAlph) Less

func (l ByAlph) Less(i, j int) bool

func (ByAlph) Swap

func (l ByAlph) Swap(i, j int)

Directories

Path Synopsis
cmd
generate
std

Jump to

Keyboard shortcuts

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