MCPcopy Index your code
hub / github.com/commitdev/zero / ParseModuleConfig

Function ParseModuleConfig

internal/module/module.go:36–42  ·  view source on GitHub ↗

ParseModuleConfig loads the local config file for a module and parses the yaml

(source string)

Source from the content-addressed store, hash-verified

34
35// ParseModuleConfig loads the local config file for a module and parses the yaml
36func ParseModuleConfig(source string) (moduleconfig.ModuleConfig, error) {
37 localPath := GetSourceDir(source)
38 config := moduleconfig.ModuleConfig{}
39 configPath := path.Join(localPath, constants.ZeroModuleYml)
40 config, err := moduleconfig.LoadModuleConfig(configPath)
41 return config, err
42}
43
44// GetSourcePath gets a unique local source directory name. For local modules, it use the local directory
45func GetSourceDir(source string) string {

Callers 5

loadAllModulesFunction · 0.92
TestParseModuleConfigFunction · 0.92
modulesWalkCmdFunction · 0.92
GenerateFunction · 0.92

Calls 2

LoadModuleConfigFunction · 0.92
GetSourceDirFunction · 0.85

Tested by 2

TestParseModuleConfigFunction · 0.74