blob: 29ccc4d1334c48ac92a47102c30e68d0bc4636fb [file] [log] [blame]
Don Newton98fd8812019-09-23 15:15:02 -04001// 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
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +00005//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
Don Newton98fd8812019-09-23 15:15:02 -04007
8// Unix environment variables.
9
10package unix
11
12import "syscall"
13
14func Getenv(key string) (value string, found bool) {
15 return syscall.Getenv(key)
16}
17
18func Setenv(key, value string) error {
19 return syscall.Setenv(key, value)
20}
21
22func Clearenv() {
23 syscall.Clearenv()
24}
25
26func Environ() []string {
27 return syscall.Environ()
28}
29
30func Unsetenv(key string) error {
31 return syscall.Unsetenv(key)
32}