feat: advanced mapping with support for splitting configurations into multiple files. #141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
为
advanced mapping
添加“支持将配置拆分到多个配置文件”的特性功能介绍:
1、共用原有的
-c, --config
命令选项,不破坏已有的行为2、当传参为文件路径时,按照以前的逻辑进行处理
3、当传参为目录路径时,会递归查找指定目录及其子目录(未限制深度,并且会自动跟链接符号)下的
json
和toml
配置文件(支持混合目录)4、所有配置文件按照
advanced mapping
的配置尝试进行解析和简单的合并(无去重行为,需使用者自行处理),解析失败则报错退出程序5、当传参为目录路径时,且混入
LegacyConf
配置文件时,解析到此文件会报错退出程序(需使用者自行剔除)6、当初始化 EndPoint 时,遇到在同一 IP 地址和端口重复监听时,则报错退出(需使用者自行剔除重复项)