浏览代码

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 <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Tobias Klauser 8 年之前
父节点
当前提交
3ca7571cef
共有 2 个文件被更改,包括 4 次插入15 次删除
  1. 0 15
      windows/env_unset.go
  2. 4 0
      windows/env_windows.go

+ 0 - 15
windows/env_unset.go

@@ -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)
-}

+ 4 - 0
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)
+}