# tmuxtest.Main

- **Module:** tmuxtest
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/tmuxtest/harness.go#L237
- **Page:** https://libtmux.org/en/go/latest/reference/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].
