Initial commit

This commit is contained in:
2024-08-30 11:25:28 +12:00
commit 0cd89c0707
31 changed files with 1470 additions and 0 deletions

28
main.go Normal file
View File

@@ -0,0 +1,28 @@
package main
import (
"github.com/charmbracelet/log"
"github.com/samber/lo"
"hub.cybercinch.nz/guisea/go-template/cmd"
"hub.cybercinch.nz/guisea/go-template/internal/config"
"hub.cybercinch.nz/guisea/go-template/internal/logger"
"os"
)
func handlePanic() {
if err := recover(); err != nil {
log.Error("crashed", "err", err)
os.Exit(1)
}
}
func main() {
defer handlePanic()
// prepare config and logs
lo.Must0(config.Init())
lo.Must0(logger.Init())
// run the app
cmd.Execute()
}