Accept empty file as config #241

Merged
wolfogre merged 3 commits from bugfix/empty_config into main 2023-06-15 05:40:39 +00:00
wolfogre commented 2023-06-15 04:24:06 +00:00 (Migrated from gitea.com)

Close #240

yaml.Decoder.Decode will return EOF when the root node is nil , see https://github.com/go-yaml/yaml/blob/v3/yaml.go#L125

While yaml.Unmarshal will accept it, see https://github.com/go-yaml/yaml/blob/v3/yaml.go#L162

Close #240 `yaml.Decoder.Decode` will return EOF when the root node is nil , see https://github.com/go-yaml/yaml/blob/v3/yaml.go#L125 While `yaml.Unmarshal` will accept it, see https://github.com/go-yaml/yaml/blob/v3/yaml.go#L162
Zettat123 (Migrated from gitea.com) approved these changes 2023-06-15 05:30:55 +00:00
Sign in to join this conversation.