error print fix
This commit is contained in:
parent
081e1edd24
commit
0333862e3c
@ -1,9 +1,9 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/gofiber/fiber/v2/log"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ func init() {
|
|||||||
func GetEnv(name string, defVal string) string {
|
func GetEnv(name string, defVal string) string {
|
||||||
env := os.Getenv(name)
|
env := os.Getenv(name)
|
||||||
if env == "" {
|
if env == "" {
|
||||||
fmt.Panicln("Missing " + name + " env variable")
|
log.Panicf("Missing %s env variable", name)
|
||||||
}
|
}
|
||||||
|
|
||||||
return env
|
return env
|
||||||
|
Loading…
Reference in New Issue
Block a user