MCPcopy Create free account
hub / github.com/apache/dubbo-go / resolverFilePath

Function resolverFilePath

config/config_loader_options.go:183–190  ·  view source on GitHub ↗

resolverFilePath resolver file path eg: give a ./conf/dubbogo.yaml return dubbogo and yaml

(path string)

Source from the content-addressed store, hash-verified

181// resolverFilePath resolver file path
182// eg: give a ./conf/dubbogo.yaml return dubbogo and yaml
183func 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
193func (conf *loaderConf) MergeConfig(koan *koanf.Koanf) *koanf.Koanf {

Callers 5

TestResolverFilePathFunction · 0.70
NewLoaderConfFunction · 0.70
WithPathFunction · 0.70

Calls

no outgoing calls