Skip to content

Commit

Permalink
add possibility to use only env variable as config
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetancollaud committed Dec 17, 2023
1 parent 7dcd928 commit de0ae0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package config

import (
"fmt"
"github.com/rs/zerolog/log"
"github.com/spf13/viper"
)

Expand Down Expand Up @@ -98,7 +99,7 @@ func ReadConfig() (*Config, error) {

err := viper.ReadInConfig()
if err != nil {
return nil, fmt.Errorf("ReadInConfig error: %w", err)
log.Info().Err(err).Msg("No config file found, using environment variables only")
}

// Check for deprecated and undefined fields.
Expand Down

0 comments on commit de0ae0c

Please sign in to comment.