Skip to content

Commit

Permalink
Conf : WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
olevitt committed Mar 21, 2024
1 parent 4ea9b63 commit 3b28d36
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/configuration/configurationLoader.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package configuration
import (
_ "embed"
"fmt"
"log"
"strings"

"github.com/knadh/koanf/parsers/yaml"
Expand All @@ -16,11 +15,7 @@ var Config Configuration
var k = koanf.New(".")

func LoadConfiguration() {
if err := k.Load(file.Provider("config.yaml"), yaml.Parser()); err != nil {
log.Fatalf("error loading config: %v", err)
}

// Load YAML config and merge into the previously loaded config (because we can).
k.Load(file.Provider("config.yaml"), yaml.Parser())
k.Load(file.Provider("config.local.yaml"), yaml.Parser())
k.Load(env.Provider("", ".", func(s string) string {
return strings.Replace(strings.ToLower(s), "_", ".", -1)
Expand Down

0 comments on commit 3b28d36

Please sign in to comment.