This commit is contained in:
Lars
2024-01-10 21:20:45 +01:00
parent 34bdd1b43a
commit 9ce6757fcd
18 changed files with 571 additions and 2 deletions

7
helpers/errors.go Normal file
View File

@@ -0,0 +1,7 @@
package helpers
func PanicIfError(err error) {
if err != nil {
panic(err)
}
}

16
helpers/logging.go Normal file
View File

@@ -0,0 +1,16 @@
package helpers
import (
"log"
"os"
)
var Logger *log.Logger
func InitializeLogger() {
if Logger == nil {
Logger = log.Default()
Logger.Print("Logger started")
Logger.SetOutput(os.Stdout)
}
}