Procházet zdrojové kódy

go.sys: add Unsetenv

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/153810043
Brad Fitzpatrick před 11 roky
rodič
revize
c65f27ffe6
3 změnil soubory, kde provedl 42 přidání a 0 odebrání
  1. 14 0
      plan9/env_unset.go
  2. 14 0
      unix/env_unset.go
  3. 14 0
      windows/env_unset.go

+ 14 - 0
plan9/env_unset.go

@@ -0,0 +1,14 @@
+// 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 plan9
+
+import "syscall"
+
+func Unsetenv(key string) error {
+	// This was added in Go 1.4.
+	return syscall.Unsetenv(key)
+}

+ 14 - 0
unix/env_unset.go

@@ -0,0 +1,14 @@
+// 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)
+}

+ 14 - 0
windows/env_unset.go

@@ -0,0 +1,14 @@
+// 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 windows
+
+import "syscall"
+
+func Unsetenv(key string) error {
+	// This was added in Go 1.4.
+	return syscall.Unsetenv(key)
+}