Help us shape the future of Go! Take the 2026 Go Developer Survey

Source file src/internal/analysis/unitchecker/unitchecker.go

     1  // Copyright 2026 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Package unitchecker provides the unitchecker analysis driver, from
     6  // the copy of golang.org/x/tools vendored into the standard library,
     7  // to cmd/vet. Analyzers run by it must come from the same copy (see
     8  // [internal/analysis/suite/vet]), since the *analysis.Analyzer types
     9  // must be identical.
    10  package unitchecker
    11  
    12  import (
    13  	"golang.org/x/tools/go/analysis"
    14  	"golang.org/x/tools/go/analysis/unitchecker"
    15  )
    16  
    17  // Main is the main function of a vet tool that runs the specified
    18  // analyzers, as invoked by the go command. It never returns.
    19  func Main(analyzers ...*analysis.Analyzer) {
    20  	unitchecker.Main(analyzers...)
    21  }
    22  

View as plain text