# tmuxtest.Main

- **Module:** tmuxtest
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/tmuxtest/harness.go#L234
- **Page:** https://libtmux.org/reference/go/tmuxtest-main/

```
tmuxtest.Main(m: *testing.M) -> int
```

Main runs the one-call package lifecycle for tmuxtest. It prepares short temporary paths, redirects [suiteEnvironment] into them, runs m, cleans registered servers, restores the environment, and returns the final status. TestMain should return its result through [os.Exit].
