mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
23 lines
354 B
Go
23 lines
354 B
Go
|
package base
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"path"
|
||
|
)
|
||
|
|
||
|
// CommandEnvHolder is a struct holds the environment info of commands
|
||
|
type CommandEnvHolder struct {
|
||
|
Exec string
|
||
|
}
|
||
|
|
||
|
// CommandEnv holds the environment info of commands
|
||
|
var CommandEnv CommandEnvHolder
|
||
|
|
||
|
func init() {
|
||
|
exec, err := os.Executable()
|
||
|
if err != nil {
|
||
|
return
|
||
|
}
|
||
|
CommandEnv.Exec = path.Base(exec)
|
||
|
}
|