TTL (Self-Destruct)
The --ttl flag arms a self-destruct timer. When the duration elapses, goshs shuts down gracefully — exactly as if you had pressed Ctrl+C.
Duration syntax
The flag accepts any Go duration string:
| Example | Meaning |
|---|---|
30m |
30 minutes |
2h |
2 hours |
90s |
90 seconds |
1h30m |
1 hour 30 minutes |
A value of 0 (the default) disables the timer entirely.
TUI integration
When --tui is also active, the countdown is shown in the TUI status bar and the dashboard exits automatically when the timer fires before handing off to the graceful shutdown.
CLI flag
Config file
In the config file ttl is specified in seconds (7200 = 2 hours). On the command line the standard Go duration syntax applies.