mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 03:19:36 +03:00
v1.0.0
This commit is contained in:
23
main/commands/base/env.go
Normal file
23
main/commands/base/env.go
Normal file
@ -0,0 +1,23 @@
|
||||
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)
|
||||
CommandEnv.Exec = "xray"
|
||||
}
|
Reference in New Issue
Block a user