23 lines
433 B
Go
23 lines
433 B
Go
package envs
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/shirou/gopsutil/v4/process"
|
|
"r00t2.io/sysutils/internal"
|
|
)
|
|
|
|
var (
|
|
StructTagInterpolate string = "envsub"
|
|
)
|
|
|
|
var (
|
|
defEnv *StaticEnv = &StaticEnv{
|
|
dynamic: true,
|
|
self: true,
|
|
// don't need a process.NewProcess since the only extra thing it does is check if the PID exists.
|
|
proc: &process.Process{Pid: int32(os.Getpid())},
|
|
envVars: internal.EnvListToMap(os.Environ()),
|
|
}
|
|
)
|