fix: display version number

This commit is contained in:
2025-05-12 13:42:23 -04:00
parent e6ab5700de
commit d91c90a5c2
7 changed files with 25 additions and 16 deletions

View File

@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"log"
"log/slog"
"net/http"
"net/url"
"os"
@ -30,9 +29,6 @@ import (
)
func main() {
logger := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{}))
slog.SetDefault(logger)
// Get env
env, err := getEnv()
if err != nil {
@ -91,7 +87,7 @@ func main() {
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
go func() {
sig := <-sigs
slog.Warn(fmt.Sprintf("Received signal %s, exiting", sig))
log.Printf("Received signal %s, exiting", sig)
// Close HTTP server
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
@ -120,7 +116,7 @@ type env struct {
func getEnv() (*env, error) {
err := godotenv.Load()
if err != nil {
slog.Warn("Failed to load .env file, using environment variables")
log.Println("Failed to load .env file, using environment variables")
}
// Create