Skip to content

Commit

Permalink
awstesting: Deprecate StashEnv and PopEnv (#2721)
Browse files Browse the repository at this point in the history
The utilities StashEnv and PopEnv are moved to an internal package named sdktesting, and thus are deprecated from the awstesting package.
  • Loading branch information
skotambkar authored and jasdel committed Jul 30, 2019
1 parent 408d8c2 commit fd304fe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions awstesting/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()

Expand Down

0 comments on commit fd304fe

Please sign in to comment.