mirror of
https://github.com/Xevion/banner.git
synced 2026-01-31 02:23:34 -06:00
Clean up main.go
This commit is contained in:
@@ -196,16 +196,16 @@ func main() {
|
|||||||
}
|
}
|
||||||
log.Info().Msg("Command registration complete")
|
log.Info().Msg("Command registration complete")
|
||||||
|
|
||||||
// terms, _ := GetTerms("", 1, 25)
|
// Close session, ensure http client closes idle connections
|
||||||
|
|
||||||
// Cloes session, ensure http client closes idle connections
|
|
||||||
defer session.Close()
|
defer session.Close()
|
||||||
defer client.CloseIdleConnections()
|
defer client.CloseIdleConnections()
|
||||||
|
|
||||||
|
// Setup signal handler channel
|
||||||
stop := make(chan os.Signal, 1)
|
stop := make(chan os.Signal, 1)
|
||||||
signal.Notify(stop, os.Interrupt) // Ctrl+C signal
|
signal.Notify(stop, os.Interrupt) // Ctrl+C signal
|
||||||
signal.Notify(stop, syscall.SIGTERM) // Container stop signal
|
signal.Notify(stop, syscall.SIGTERM) // Container stop signal
|
||||||
|
|
||||||
|
// Wait for signal (indefinite)
|
||||||
<-stop
|
<-stop
|
||||||
|
|
||||||
// Defers are called after this
|
// Defers are called after this
|
||||||
|
|||||||
Reference in New Issue
Block a user