resolverFilePath resolver file path eg: give a ./conf/dubbogo.yaml return dubbogo and yaml
(path string)
| 314 | // resolverFilePath resolver file path |
| 315 | // eg: give a ./conf/dubbogo.yaml return dubbogo and yaml |
| 316 | func resolverFilePath(path string) (name, suffix string) { |
| 317 | paths := strings.Split(path, "/") |
| 318 | fileName := strings.Split(paths[len(paths)-1], ".") |
| 319 | if len(fileName) < 2 { |
| 320 | return fileName[0], string(file.YAML) |
| 321 | } |
| 322 | return fileName[0], fileName[1] |
| 323 | } |
| 324 | |
| 325 | // MergeConfig merge config file |
| 326 | func (conf *loaderConf) MergeConfig(koan *koanf.Koanf) *koanf.Koanf { |
no outgoing calls
no test coverage detected