You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

33 lines
717 B

  1. // Copyright 2010 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
  5. // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
  6. // Unix environment variables.
  7. package unix
  8. import "syscall"
  9. func Getenv(key string) (value string, found bool) {
  10. return syscall.Getenv(key)
  11. }
  12. func Setenv(key, value string) error {
  13. return syscall.Setenv(key, value)
  14. }
  15. func Clearenv() {
  16. syscall.Clearenv()
  17. }
  18. func Environ() []string {
  19. return syscall.Environ()
  20. }
  21. func Unsetenv(key string) error {
  22. return syscall.Unsetenv(key)
  23. }