浏览代码

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 <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Tobias Klauser 8 年之前
父节点
当前提交
1792d66dc8
共有 2 个文件被更改,包括 4 次插入14 次删除
  1. 4 0
      unix/env_unix.go
  2. 0 14
      unix/env_unset.go

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

+ 0 - 14
unix/env_unset.go

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