diff --git a/main.go b/main.go index cf2b42e..542219a 100644 --- a/main.go +++ b/main.go @@ -5,17 +5,18 @@ import ( _ "embed" "flag" "fmt" - "github.com/fsnotify/fsnotify" - "github.com/yuin/goldmark" "io" "io/fs" - "lcthw.dev/go/ssgod/config" "log" "os" "path/filepath" "strings" "text/template" "time" + + "github.com/fsnotify/fsnotify" + "github.com/yuin/goldmark" + "lcthw.dev/go/ssgod/config" ) //go:embed example/.ssgod.json @@ -33,12 +34,12 @@ func (meta *PageMetaData) AddPage(path string) { func Fatal(err error, format string, v ...any) { err_format := fmt.Sprintf("ERROR: %v; %s", err, format) - panic(fmt.Sprintf(err_format, v...)) + log.Panicf(err_format, v...) } func Fail(err error, format string, v ...any) error { err_format := fmt.Sprintf("ERROR: %v; %s", err, format) - panic(fmt.Sprintf(err_format, v...)) + log.Panicf(err_format, v...) return err }