You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Xray-core/main/commands/base/env.go

27 lines
481 B

4 years ago
package base
import (
"os"
"path"
)
// CommandEnvHolder is a struct holds the environment info of commands
type CommandEnvHolder struct {
4 years ago
// Excutable name of current binary
4 years ago
Exec string
4 years ago
// commands column width of current command
CommandsWidth int
4 years ago
}
// 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"
}