Products app

This commit is contained in:
Eden Kirin
2024-01-14 11:47:50 +01:00
parent ff375ae3e8
commit 304ce0678a
17 changed files with 492 additions and 1 deletions

View File

@ -0,0 +1,24 @@
package cfg
import (
"github.com/kelseyhightower/envconfig"
)
type configStruct struct {
DbHost string `default:"localhost"`
DbPort int `default:"55432"`
DbName string `default:"komponiranje"`
DbUser string `default:"pero"`
DbPassword string `default:"pero.000"`
}
const ENV_PREFIX = ""
var Config configStruct
func init() {
err := envconfig.Process(ENV_PREFIX, &Config)
if err != nil {
panic(err)
}
}