close

command
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2025 License: BSD-3-Clause, MIT Imports: 6 Imported by: 0

README

Close Example

close example

Creates a context with cancellation and captures when a close event occurs on the window. A <-ctx.Done() listens on a goroutine and does "cleanup", then re-initiates the close. Close then sees the ctx.Err and will exit properly.

This gives you the ability to lock out terminating the window to allow you to shut down dependent services, such as a database, gracefully.

End Task or other forcefull kill methods will still bypass this, but that's expected.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL