...

Package sortslice

import "golang.org/x/tools/go/analysis/passes/sortslice"
Overview
Index

Overview ▾

Package sortslice defines an Analyzer that checks for calls to sort.Slice that do not use a slice type as first argument.

Index ▾

Package files

analyzer.go

Constants

const Doc = `check the argument type of sort.Slice

sort.Slice requires an argument of a slice type. Check that
the interface{} value passed to sort.Slice is actually a slice.`

Variables

var Analyzer = &analysis.Analyzer{
    Name:     "sortslice",
    Doc:      Doc,
    Requires: []*analysis.Analyzer{inspect.Analyzer},
    Run:      run,
}