gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/internal/syscall/execenv/execenv_default.go (about)

     1  // Copyright 2020 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  
     5  //go:build !windows
     6  // +build !windows
     7  
     8  package execenv
     9  
    10  import "syscall"
    11  
    12  // Default will return the default environment
    13  // variables based on the process attributes
    14  // provided.
    15  //
    16  // Defaults to syscall.Environ() on all platforms
    17  // other than Windows.
    18  func Default(sys *syscall.SysProcAttr) ([]string, error) {
    19  	return syscall.Environ(), nil
    20  }