test
This commit is contained in:
parent
24ab6d3183
commit
bf426f4bd9
2 changed files with 14 additions and 1 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
8
main.go
8
main.go
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue