diff options
author | Duco van Amstel <helcaraxan@gmail.com> | 2018-11-18 17:55:05 +0000 |
---|---|---|
committer | Wim <wim@42.be> | 2018-11-25 21:21:04 +0100 |
commit | 09875fe1603307080f3a4172985c5dca3bd9912d (patch) | |
tree | a23220772f6f6597d509ca71b2df3480a77b8076 /vendor/github.com/google/gops/internal | |
parent | f716b8fc0ff90f47b61e218ef34019b38bd70e0d (diff) | |
download | matterbridge-msglm-09875fe1603307080f3a4172985c5dca3bd9912d.tar.gz matterbridge-msglm-09875fe1603307080f3a4172985c5dca3bd9912d.tar.bz2 matterbridge-msglm-09875fe1603307080f3a4172985c5dca3bd9912d.zip |
Update direct dependencies where possible
Diffstat (limited to 'vendor/github.com/google/gops/internal')
-rw-r--r-- | vendor/github.com/google/gops/internal/internal.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/google/gops/internal/internal.go b/vendor/github.com/google/gops/internal/internal.go index 13828220..80eac63f 100644 --- a/vendor/github.com/google/gops/internal/internal.go +++ b/vendor/github.com/google/gops/internal/internal.go @@ -1,3 +1,7 @@ +// 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 internal import ( @@ -11,7 +15,13 @@ import ( "strings" ) +const gopsConfigDirEnvKey = "GOPS_CONFIG_DIR" + func ConfigDir() (string, error) { + if configDir := os.Getenv(gopsConfigDirEnvKey); configDir != "" { + return configDir, nil + } + if runtime.GOOS == "windows" { return filepath.Join(os.Getenv("APPDATA"), "gops"), nil } |