You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: tool.go
    path of file: ./repos/under-the-hood/gosrc/cmd/go/internal/base
    
    the code of the file until where you have to start completion: // Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package base

import (
	"fmt"
	"go/build"
	"os"
	"path/filepath"
	"runtime"

	"cmd/go/internal/cfg"
)

// Configuration for finding tool binaries.
var (
	ToolGOOS      = runtime.GOOS
	ToolGOARCH    = runtime.GOARCH
	ToolIsWi
    
func Tool(toolName string) string {
	toolPath := filepath.Join(ToolDir, toolName)
	if ToolIsWindows {
		toolPath += ToolWindowsExtension
	}
	if len(cfg.BuildToolexec) > 0 {
		return toolPath
	}
	// Give a nice message if there is no tool with that name.
	if _, err := os.Stat(toolPath); err != nil {
		fmt.Fprintf(os.Stderr, "go tool: no such tool %q\n", toolName)
		SetExitStatus(2)
		Exit()
	}
	return toolPath
}