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

Function resolverFilePath

loader.go:316–323  ·  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

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

Callers 2

NewLoaderConfFunction · 0.70
WithPathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected