loadConfig should not be exported.
All checks were successful
Build Docker image / build (push) Successful in 1m10s
Build Golang packages / release (push) Has been skipped

This commit is contained in:
Pieter Hollander 2024-07-25 22:46:34 +02:00
parent 79ea7706e1
commit d7262164f6
Signed by: pieter
SSH key fingerprint: SHA256:HbX+9cBXsop9SuvL+mELd29sK+7DehFfdVweFVDtMSg

View file

@ -157,7 +157,7 @@ var config Config
// LoadConfig attempts to read the configuration from options.json
// If it fails, it falls back to using environment variables
func LoadConfig() Config {
func loadConfig() Config {
configFilePath := os.Getenv("CONFIG_FILE")
if configFilePath == "" {
configFilePath = "/data/options.json"
@ -201,7 +201,7 @@ func main() {
slog.SetDefault(logger)
// Load the configuration
config := LoadConfig()
config := loadConfig()
dbConnStr := config.DB
// Connect to PostgreSQL