fix: use log.Fatal for fatal errors
This commit is contained in:
parent
6b6881495b
commit
b12e091c42
1 changed files with 4 additions and 2 deletions
6
main.go
6
main.go
|
|
@ -1,13 +1,15 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log/slog"
|
"log"
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/ayn2op/discordo/cmd"
|
"github.com/ayn2op/discordo/cmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
slog.Error("failed to run command", "err", err)
|
log.SetOutput(os.Stderr)
|
||||||
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue