This repository has been archived on 2025-07-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
magicbox/main.go
2024-04-05 01:09:22 +01:00

23 lines
410 B
Go

package main
import (
"fmt"
"git.tdpain.net/codemicro/magicbox/internal/config"
"git.tdpain.net/codemicro/magicbox/internal/server"
"log/slog"
"os"
)
func main() {
if err := run(); err != nil {
slog.Error("fatal error", "error", err)
os.Exit(1)
}
}
func run() error {
if err := config.Validate(); err != nil {
return fmt.Errorf("validate config: %w", err)
}
return server.ListenAndServe()
}