go-kratos / kratos

Your ultimate Go microservices framework for the cloud-native era.
https://go-kratos.dev
MIT License
22.55k stars 3.94k forks source link

fix: yaml.Codec supports both the keys "yaml" and "yml" at the same time #3304

Closed DCjanus closed 1 month ago

DCjanus commented 1 month ago

Description (what this PR does / why we need it):

In the past, when we tried to execute ./server -conf ./configs/config.yml, it would generate an error message saying failed to merge config source: unsupported key: config.yml format: yml, but using config.yaml did not.

This may be confusing because both yaml and yml are valid suffixes for YAML.

Which issue(s) this PR fixes (resolves / be part of):

Other special notes for the reviewers:

DCjanus commented 1 month ago

@tonybase would you mind to take a look, which would be really helpful.

demoManito commented 1 month ago

discussed this issue before: https://github.com/go-kratos/kratos/issues/3035