From 1792d66dc88e503d3cb2400578221cdf1f7fe26f Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 7 Jan 2018 21:26:51 +0100 Subject: [PATCH] unix: move Unsetenv into env_unix.go Unsetenv was in its own file for Go 1.4 compatibility. This version is no longer supported, so move Unsetenv with the other environment specific functions. Change-Id: I81ed5182297598a7b3859711211ec8ef194bbe9a Reviewed-on: https://go-review.googlesource.com/86538 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- unix/env_unix.go | 4 ++++ unix/env_unset.go | 14 -------------- 2 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 unix/env_unset.go diff --git a/unix/env_unix.go b/unix/env_unix.go index 2e06b33f..706b3cd1 100644 --- a/unix/env_unix.go +++ b/unix/env_unix.go @@ -25,3 +25,7 @@ func Clearenv() { func Environ() []string { return syscall.Environ() } + +func Unsetenv(key string) error { + return syscall.Unsetenv(key) +} diff --git a/unix/env_unset.go b/unix/env_unset.go deleted file mode 100644 index c44fdc4a..00000000 --- a/unix/env_unset.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2014 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. - -// +build go1.4 - -package unix - -import "syscall" - -func Unsetenv(key string) error { - // This was added in Go 1.4. - return syscall.Unsetenv(key) -}