Added license. Cleanup and expanded documentation.

This commit is contained in:
mikestefanello 2021-12-31 10:09:52 -05:00
parent d35cf1d8a6
commit 86774ae781
6 changed files with 118 additions and 60 deletions

View file

@ -52,9 +52,9 @@ func main() {
}()
// Wait for interrupt signal to gracefully shutdown the server with a timeout of 10 seconds.
// Use a buffered channel to avoid missing signals as recommended for signal.Notify
quit := make(chan os.Signal, 1)
signal.Notify(quit, os.Interrupt)
signal.Notify(quit, os.Kill)
<-quit
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()