2020-07-06 09:18:16 +00:00
|
|
|
package main
|
2020-07-03 12:03:06 +00:00
|
|
|
|
2020-11-24 07:06:39 +00:00
|
|
|
import (
|
2021-05-25 10:30:54 +00:00
|
|
|
"context"
|
|
|
|
"os/signal"
|
|
|
|
"syscall"
|
2020-11-24 07:06:39 +00:00
|
|
|
)
|
|
|
|
|
2022-09-12 09:45:54 +00:00
|
|
|
func main() {
|
|
|
|
g, _ := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
2020-11-24 07:06:39 +00:00
|
|
|
|
2022-09-12 09:45:54 +00:00
|
|
|
v := newSettings()
|
2023-11-09 06:07:11 +00:00
|
|
|
l := pickLogger(v)
|
2020-11-24 07:06:39 +00:00
|
|
|
|
2022-09-12 09:45:54 +00:00
|
|
|
a := newApp(g, l, v)
|
2020-07-03 12:03:06 +00:00
|
|
|
|
2022-09-12 09:45:54 +00:00
|
|
|
go a.Serve(g)
|
2020-07-03 12:03:06 +00:00
|
|
|
|
2020-07-12 23:00:47 +00:00
|
|
|
a.Wait()
|
2020-07-03 12:03:06 +00:00
|
|
|
}
|