mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-23 05:36:06 +03:00
27 lines
481 B
Go
27 lines
481 B
Go
package base
|
|
|
|
import (
|
|
"os"
|
|
"path"
|
|
)
|
|
|
|
// CommandEnvHolder is a struct holds the environment info of commands
|
|
type CommandEnvHolder struct {
|
|
// Excutable name of current binary
|
|
Exec string
|
|
// commands column width of current command
|
|
CommandsWidth int
|
|
}
|
|
|
|
// 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"
|
|
}
|