Imports #
"context"
"debug/buildinfo"
"errors"
"fmt"
"io/fs"
"os"
"path/filepath"
"runtime"
"strings"
"cmd/go/internal/base"
"cmd/go/internal/gover"
"context"
"debug/buildinfo"
"errors"
"fmt"
"io/fs"
"os"
"path/filepath"
"runtime"
"strings"
"cmd/go/internal/base"
"cmd/go/internal/gover"
var CmdVersion = *ast.UnaryExpr
var versionM = *ast.CallExpr
var versionV = *ast.CallExpr
func init()
isGoBinaryCandidate reports whether the file is a candidate to be a Go binary.
func isGoBinaryCandidate(file string, info fs.FileInfo) bool
func runVersion(ctx context.Context, cmd *base.Command, args []string)
scanDir scans a directory for binary to run scanFile on.
func scanDir(dir string)
scanFile scans file to try to report the Go and module versions. If mustPrint is true, scanFile will report any error reading file. Otherwise (mustPrint is false, because scanFile is being called by scanDir) scanFile prints nothing for non-Go binaries. scanFile reports whether the file is a Go binary.
func scanFile(file string, info fs.FileInfo, mustPrint bool) bool
Generated with Arrow