some deletions
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201105173854-bc9fc8d8c4bc / cmd / godoc / goroot.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/cmd/godoc/goroot.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/cmd/godoc/goroot.go
deleted file mode 100644 (file)
index 755069d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2018 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 main
-
-import (
-       "os"
-       "os/exec"
-       "path/filepath"
-       "runtime"
-       "strings"
-)
-
-func findGOROOT() string {
-       if env := os.Getenv("GOROOT"); env != "" {
-               return filepath.Clean(env)
-       }
-       def := filepath.Clean(runtime.GOROOT())
-       if runtime.Compiler == "gccgo" {
-               // gccgo has no real GOROOT, and it certainly doesn't
-               // depend on the executable's location.
-               return def
-       }
-       out, err := exec.Command("go", "env", "GOROOT").Output()
-       if err != nil {
-               return def
-       }
-       return strings.TrimSpace(string(out))
-}