ITRS-Group / cordial

Cordial comprises a set of interrelated programs, integrations, libraries and packages for Geneos, principally written in Go.
Other
7 stars 0 forks source link

config (viper) tries to read a binary file in the same directory #126

Closed pgalbavy-itrs closed 1 year ago

pgalbavy-itrs commented 1 year ago

If a config pkg using program uses Load() like this:

cf := config.Load("name", config.SetFileFormat("yaml"), ...)

then it will try reading files in the working directory without extensions and that can be "name" which generates and error.

Try to find a way to force viper (under config) to ignore files without extensions or, worst case, ignore working directory by default?