mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
Make windows implementation similar to unix. Updates golang/go#10803 (0intro will close the issue) Change-Id: I6f6a7b1c84f54b1ec92f0346a9998df34235c71a Reviewed-on: https://go-review.googlesource.com/10077 Reviewed-by: Rob Pike <r@golang.org>
26 lines
487 B
Go
26 lines
487 B
Go
// Copyright 2010 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.
|
|
|
|
// Windows environment variables.
|
|
|
|
package windows
|
|
|
|
import "syscall"
|
|
|
|
func Getenv(key string) (value string, found bool) {
|
|
return syscall.Getenv(key)
|
|
}
|
|
|
|
func Setenv(key, value string) error {
|
|
return syscall.Setenv(key, value)
|
|
}
|
|
|
|
func Clearenv() {
|
|
syscall.Clearenv()
|
|
}
|
|
|
|
func Environ() []string {
|
|
return syscall.Environ()
|
|
}
|