some deletions
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201105173854-bc9fc8d8c4bc / godoc / golangorgenv / golangorgenv.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/godoc/golangorgenv/golangorgenv.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/godoc/golangorgenv/golangorgenv.go
deleted file mode 100644 (file)
index 0b96eec..0000000
+++ /dev/null
@@ -1,42 +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 golangorgenv provides environment information for programs running at
-// golang.org and its subdomains.
-package golangorgenv
-
-import (
-       "log"
-       "os"
-       "strconv"
-)
-
-var (
-       checkCountry = boolEnv("GOLANGORG_CHECK_COUNTRY")
-       enforceHosts = boolEnv("GOLANGORG_ENFORCE_HOSTS")
-)
-
-// CheckCountry reports whether country restrictions should be enforced.
-func CheckCountry() bool {
-       return checkCountry
-}
-
-// EnforceHosts reports whether host filtering should be enforced.
-func EnforceHosts() bool {
-       return enforceHosts
-}
-
-func boolEnv(key string) bool {
-       v := os.Getenv(key)
-       if v == "" {
-               // TODO(dmitshur): In the future, consider detecting if running in App Engine,
-               // and if so, making the environment variables mandatory rather than optional.
-               return false
-       }
-       b, err := strconv.ParseBool(v)
-       if err != nil {
-               log.Fatalf("environment variable %s (%q) must be a boolean", key, v)
-       }
-       return b
-}