Path: blob/main/vendor/golang.org/x/sys/unix/env_unix.go
2880 views
// Copyright 2010 The Go Authors. All rights reserved.1// Use of this source code is governed by a BSD-style2// license that can be found in the LICENSE file.34//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos56// Unix environment variables.78package unix910import "syscall"1112func Getenv(key string) (value string, found bool) {13return syscall.Getenv(key)14}1516func Setenv(key, value string) error {17return syscall.Setenv(key, value)18}1920func Clearenv() {21syscall.Clearenv()22}2324func Environ() []string {25return syscall.Environ()26}2728func Unsetenv(key string) error {29return syscall.Unsetenv(key)30}313233