env.go 469 B

1234567891011121314151617181920212223
  1. package base
  2. // CommandEnvHolder is a struct holds the environment info of commands
  3. type CommandEnvHolder struct {
  4. // Executable name of current binary
  5. Exec string
  6. // commands column width of current command
  7. CommandsWidth int
  8. }
  9. // CommandEnv holds the environment info of commands
  10. var CommandEnv CommandEnvHolder
  11. func init() {
  12. /*
  13. exec, err := os.Executable()
  14. if err != nil {
  15. return
  16. }
  17. CommandEnv.Exec = path.Base(exec)
  18. */
  19. CommandEnv.Exec = "xray"
  20. }