From 09875fe1603307080f3a4172985c5dca3bd9912d Mon Sep 17 00:00:00 2001 From: Duco van Amstel Date: Sun, 18 Nov 2018 17:55:05 +0000 Subject: Update direct dependencies where possible --- vendor/github.com/google/gops/internal/internal.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vendor/github.com/google/gops/internal') 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 } -- cgit v1.2.3