2023-05-20 20:15:57 +02:00
|
|
|
// Copyright 2023 wanderer <a_mirre at utb dot cz>
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2023-03-19 22:03:12 +01:00
|
|
|
package main
|
|
|
|
|
2023-04-19 05:30:52 +02:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
2023-08-02 15:14:44 +02:00
|
|
|
"git.dotya.ml/mirre-mt/pcmt/slogging"
|
2023-04-19 05:30:52 +02:00
|
|
|
)
|
2023-03-19 22:03:12 +01:00
|
|
|
|
|
|
|
func main() {
|
|
|
|
err := run()
|
|
|
|
if err != nil {
|
2023-08-02 15:26:51 +02:00
|
|
|
l := slogging.Logger()
|
|
|
|
if l == nil {
|
|
|
|
l = slogging.Init(true)
|
|
|
|
}
|
|
|
|
|
2023-05-02 00:04:04 +02:00
|
|
|
l.Error("unrecoverable failure, stopping the app", "error", err)
|
2023-04-19 05:30:52 +02:00
|
|
|
os.Exit(1)
|
2023-03-19 22:03:12 +01:00
|
|
|
}
|
|
|
|
}
|