...

Package fix

import "cmd/vendor/golang.org/x/tools/go/analysis/suite/fix"
Overview
Index

Overview ▾

The fix package defines the suite of analyzers used by cmd/fix, the default analysis tool run by "go fix". Its behavior is equivalent to:

func main() { unitchecker.Main(fix.Suite...) }

If you need a different suite, define your own tool and run "go vet -vettool=mytool".

Index ▾

Package files

fix.go

Variables

Suite is the suite of analyzers run by cmd/fix.

The fix suite analyzers produce fixes are unambiguously safe to apply, even if the diagnostics might not describe actual problems.

var Suite = slices.Concat(
    []*analysis.Analyzer{
        buildtag.Analyzer,
        hostport.Analyzer,
        inline.Analyzer,
    },
    modernize.Suite,
)