Skip to content

Commit

Permalink
added debuging information on config file
Browse files Browse the repository at this point in the history
  • Loading branch information
jbsv committed Nov 22, 2024
1 parent d06ca2f commit a9aa73e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package utils

import (
"fmt"
"log"
"strconv"

"github.com/BurntSushi/toml"
Expand Down Expand Up @@ -30,6 +31,11 @@ type Creds struct {
}

func LoadConfig(configFile string) (*Config, error) {
log.Printf("Loading config file from %s", configFile)
if configFile == "" {
log.Fatalf("config file is not set")
}

// load config file
c := new(Config)
_, err := toml.DecodeFile(configFile, c)
Expand Down

0 comments on commit a9aa73e

Please sign in to comment.