mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 07:07:33 -04:00
go.sys: add Unsetenv
LGTM=r R=r CC=golang-codereviews https://golang.org/cl/153810043
This commit is contained in:
@@ -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)
|
||||||
|
}
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user