This commit is contained in:
Phil 2022-12-23 23:11:40 +01:00
parent 24ab6d3183
commit bf426f4bd9
2 changed files with 14 additions and 1 deletions

View file

@ -2,6 +2,7 @@ package db
import (
"context"
"log"
"gitea.hackmi.ch/Phil/goshorly/utils"
"github.com/go-redis/redis/v8"
@ -19,5 +20,9 @@ func Client_redis() *redis.Client {
}
func Init_redis() {
Client_redis().Ping(ctx)
_, err := Client_redis().Ping(ctx).Result()
if err != nil {
log.Fatal(err.Error())
}
}

View file

@ -2,6 +2,7 @@ package main
import (
"embed"
"fmt"
"log"
"net/http"
@ -16,7 +17,14 @@ import (
//go:embed views/*
var viewsfs embed.FS
func a() error {
return fmt.Errorf("this is an error")
}
func main() {
_ = a()
utils.Print_Starting_Screen()
utils.Init_env_file()
utils.Init_env_vars()