From 3ca7571cef47426abdedf2b0e511ec757a020bd4 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 8 Jan 2018 10:20:19 +0100 Subject: [PATCH] windows: move Unsetenv into env_windows.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: I63d67e2a9e4d7651be79c2e72a7f27fe0fac68c4 Reviewed-on: https://go-review.googlesource.com/86539 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- windows/env_unset.go | 15 --------------- windows/env_windows.go | 4 ++++ 2 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 windows/env_unset.go diff --git a/windows/env_unset.go b/windows/env_unset.go deleted file mode 100644 index b712c660..00000000 --- a/windows/env_unset.go +++ /dev/null @@ -1,15 +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 windows -// +build go1.4 - -package windows - -import "syscall" - -func Unsetenv(key string) error { - // This was added in Go 1.4. - return syscall.Unsetenv(key) -} diff --git a/windows/env_windows.go b/windows/env_windows.go index e8292386..bdc71e24 100644 --- a/windows/env_windows.go +++ b/windows/env_windows.go @@ -23,3 +23,7 @@ func Clearenv() { func Environ() []string { return syscall.Environ() } + +func Unsetenv(key string) error { + return syscall.Unsetenv(key) +}