some deletions
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201105173854-bc9fc8d8c4bc / go / vcs / env.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/go/vcs/env.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/go/vcs/env.go
deleted file mode 100644 (file)
index e846f5b..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013 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 vcs
-
-import (
-       "os"
-       "strings"
-)
-
-// envForDir returns a copy of the environment
-// suitable for running in the given directory.
-// The environment is the current process's environment
-// but with an updated $PWD, so that an os.Getwd in the
-// child will be faster.
-func envForDir(dir string) []string {
-       env := os.Environ()
-       // Internally we only use rooted paths, so dir is rooted.
-       // Even if dir is not rooted, no harm done.
-       return mergeEnvLists([]string{"PWD=" + dir}, env)
-}
-
-// mergeEnvLists merges the two environment lists such that
-// variables with the same name in "in" replace those in "out".
-func mergeEnvLists(in, out []string) []string {
-NextVar:
-       for _, inkv := range in {
-               k := strings.SplitAfterN(inkv, "=", 2)[0]
-               for i, outkv := range out {
-                       if strings.HasPrefix(outkv, k) {
-                               out[i] = inkv
-                               continue NextVar
-                       }
-               }
-               out = append(out, inkv)
-       }
-       return out
-}