Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nikepan committed Dec 3, 2024
1 parent e097550 commit b9ab293
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (d *FileDumper) GetDump() (string, error) {

files, err := os.ReadDir(d.Path)
if err != nil {
log.Fatal(err)
return "", err
}
dumpFiles := make([]string, 0)
for _, f := range files {
Expand Down
8 changes: 4 additions & 4 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ type Config struct {
DumpCheckInterval int `json:"dump_check_interval"`
DumpDir string `json:"dump_dir"`
Debug bool `json:"debug"`
LogQueries bool `json:"log_queries"`
LogQueries bool `json:"log_queries"`
MetricsPrefix string `json:"metrics_prefix"`
UseTLS bool `json:"use_tls"`
TLSCertFile string `json:"tls_cert_file"`
TLSKeyFile string `json:"tls_key_file"`
TLSCertFile string `json:"tls_cert_file"`
TLSKeyFile string `json:"tls_key_file"`
}

// ReadJSON - read json file to struct
Expand Down Expand Up @@ -86,7 +86,7 @@ func ReadConfig(configFile string) (Config, error) {
cnf := Config{}
err := ReadJSON(configFile, &cnf)
if err != nil {
log.Printf("INFO: Config file %+v not found. Used%+v\n", configFile, sampleConfig)
log.Printf("INFO: Config file %+v not found. Used %+v\n", configFile, sampleConfig)
err = ReadJSON(sampleConfig, &cnf)
if err != nil {
log.Printf("ERROR: read %+v failed\n", sampleConfig)
Expand Down

0 comments on commit b9ab293

Please sign in to comment.