fix products listing
This commit is contained in:
@@ -22,6 +22,7 @@ type Config struct {
|
||||
I18n I18n
|
||||
Pdf PdfPrinter
|
||||
GoogleTranslate GoogleTranslateConfig
|
||||
Image ImageConfig
|
||||
}
|
||||
|
||||
type I18n struct {
|
||||
@@ -32,6 +33,10 @@ type ServerConfig struct {
|
||||
Host string `env:"SERVER_HOST,0.0.0.0"`
|
||||
}
|
||||
|
||||
type ImageConfig struct {
|
||||
ImagePrefix string `env:"IMAGE_PREFIX"`
|
||||
}
|
||||
|
||||
type DatabaseConfig struct {
|
||||
Host string `env:"DB_HOST,localhost"`
|
||||
Port int `env:"DB_PORT"`
|
||||
@@ -167,6 +172,10 @@ func load() *Config {
|
||||
slog.Error("not possible to load env variables for google translate : ", err.Error(), "")
|
||||
}
|
||||
|
||||
err = loadEnv(&cfg.Image)
|
||||
if err != nil {
|
||||
slog.Error("not possible to load env variables for google translate : ", err.Error(), "")
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user