resolverFilePath resolver file path eg: give a ./conf/dubbogo.yaml return dubbogo and yaml
(path string)
| 181 | // resolverFilePath resolver file path |
| 182 | // eg: give a ./conf/dubbogo.yaml return dubbogo and yaml |
| 183 | func resolverFilePath(path string) (name, suffix string) { |
| 184 | paths := strings.Split(path, "/") |
| 185 | fileName := strings.Split(paths[len(paths)-1], ".") |
| 186 | if len(fileName) < 2 { |
| 187 | return fileName[0], string(file.YAML) |
| 188 | } |
| 189 | return fileName[0], fileName[1] |
| 190 | } |
| 191 | |
| 192 | // MergeConfig merge config file |
| 193 | func (conf *loaderConf) MergeConfig(koan *koanf.Koanf) *koanf.Koanf { |
no outgoing calls