Skip to content

Commit

Permalink
pandora: use yaml format for config without extension
Browse files Browse the repository at this point in the history
pandora use yaml format if no extension provided
  • Loading branch information
nickclmb committed Nov 10, 2023
1 parent f494998 commit 8fee55f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"net/http"
"os"
"os/signal"
"path/filepath"
"runtime"
"runtime/pprof"
"strconv"
Expand All @@ -24,7 +25,7 @@ import (
"go.uber.org/zap/zapcore"
)

const Version = "0.5.15"
const Version = "0.5.16"
const defaultConfigFile = "load"
const stdinConfigSelector = "-"

Expand Down Expand Up @@ -211,6 +212,9 @@ func readConfig(args []string) *cliConfig {
useStdinConfig = true
default:
v.SetConfigFile(args[0])
if filepath.Ext(args[0]) == "" {
v.SetConfigType("yaml")
}
}
}

Expand Down

0 comments on commit 8fee55f

Please sign in to comment.