feat: do not load config file when path is empty#1263
feat: do not load config file when path is empty#1263litetex wants to merge 1 commit intoprometheus-community:masterfrom
Conversation
Signed-off-by: litetex <40789489+litetex@users.noreply.github.com>
366a183 to
70a4c2d
Compare
Hi, thank you for taking the time and asking. I'm basically running the quickstart setup without any config file. However this results in the warning: I want to get rid of the warning because - you know - it's a warning and warning's require attention/a fix in some way. I thought the simplest way was by setting Hope that this helps :) |
| decoder := yaml.NewDecoder(yamlReader) | ||
| decoder.KnownFields(true) | ||
| if f != "" { | ||
| yamlReader, err := os.Open(f) |
There was a problem hiding this comment.
could use filepath.Clean(f) instead of a plain "f"
Fixes #794