mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
12 lines
356 B
Go
12 lines
356 B
Go
package common
|
|
|
|
type envKey string
|
|
|
|
// Env is a context key that can be used to set programmatically the environment
|
|
// gopsutil relies on to perform calls against the OS.
|
|
// Example of use:
|
|
//
|
|
// ctx := context.WithValue(context.Background(), Env, map[string]string{"HOST_PROC": "/myproc"})
|
|
// avg, err := load.AvgWithContext(ctx)
|
|
var Env = envKey("env")
|