Dmitriy Gnatenko 24356e784b Add closer | 4 bulan lalu | |
---|---|---|
.. | ||
closer.go | 4 bulan lalu | |
closer_config.go | 4 bulan lalu | |
readme.md | 4 bulan lalu |
func main() {
ctx, cancel := context.WithCancel(context.Background())
closer.Init(
closer.NewConfig(
closer.WithTimeout(time.Second * 10),
)
)
// run server
cancel()
closer.Wait(ctx)
}