mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-11-23 12:02:58 -05:00
v5: Remove v2ctl & wv2ray (rebased from 7c1ab06206)
This commit is contained in:
25
main/commands/base/env.go
Normal file
25
main/commands/base/env.go
Normal file
@@ -0,0 +1,25 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user