From fd304fe4cb2ea1027e7fc7e21062beb768915fcc Mon Sep 17 00:00:00 2001 From: Shantanu Kotambkar <52007797+skotambkar@users.noreply.github.com> Date: Tue, 30 Jul 2019 09:43:14 -0700 Subject: [PATCH] awstesting: Deprecate StashEnv and PopEnv (#2721) The utilities StashEnv and PopEnv are moved to an internal package named sdktesting, and thus are deprecated from the awstesting package. --- awstesting/util.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/awstesting/util.go b/awstesting/util.go index 7252cc0b79..aad1fe8901 100644 --- a/awstesting/util.go +++ b/awstesting/util.go @@ -97,6 +97,10 @@ func (c *FakeContext) Value(key interface{}) interface{} { // StashEnv stashes the current environment variables and returns an array of // all environment values as key=val strings. +// +// Deprecated: StashEnv exists for backward compatibility and may be removed from the future iterations. +// It is not `internal` so that if you really need to use its functionality, and understand breaking +// changes will be made, you are able to. func StashEnv() []string { env := os.Environ() os.Clearenv() @@ -106,6 +110,10 @@ func StashEnv() []string { // PopEnv takes the list of the environment values and injects them into the // process's environment variable data. Clears any existing environment values // that may already exist. +// +// Deprecated: PopEnv exists for backward compatibility and may be removed from the future iterations. +// It is not `internal` so that if you really need to use its functionality, and understand breaking +// changes will be made, you are able to. func PopEnv(env []string) { os.Clearenv()