tool

Imports

Imports #

"cmd/internal/telemetry/counter"
"context"
"encoding/json"
"errors"
"flag"
"fmt"
"go/build"
"internal/platform"
"maps"
"os"
"os/exec"
"os/signal"
"path/filepath"
"slices"
"sort"
"strings"
"cmd/go/internal/base"
"cmd/go/internal/cfg"
"cmd/go/internal/load"
"cmd/go/internal/modload"
"cmd/go/internal/str"
"cmd/go/internal/work"

Constants & Variables

CmdTool var #

var CmdTool = *ast.UnaryExpr

toolN var #

var toolN bool

Functions

buildAndRunModtool function #

func buildAndRunModtool(ctx context.Context, tool string, args []string)

defaultExecName function #

func defaultExecName(importPath string) string

impersonateDistList function #

func impersonateDistList(args []string) (handled bool)

init function #

func init()

isGccgoTool function #

Return whether tool can be expected in the gccgo tool directory. Other binaries could be in the same directory so don't show those with the 'go tool' command.

func isGccgoTool(tool string) bool

listTools function #

listTools prints a list of the available tools in the tools directory.

func listTools(ctx context.Context)

loadModTool function #

func loadModTool(ctx context.Context, name string) string

runBuiltTool function #

func runBuiltTool(b *work.Builder, ctx context.Context, a *work.Action) error

runTool function #

func runTool(ctx context.Context, cmd *base.Command, args []string)

Generated with Arrow