MCPcopy Index your code
hub / github.com/devspace-sh/devspace / NewConfigLoader

Function NewConfigLoader

pkg/devspace/config/loader/loader.go:80–93  ·  view source on GitHub ↗

NewConfigLoader creates a new config loader with the given options

(configPath string)

Source from the content-addressed store, hash-verified

78
79// NewConfigLoader creates a new config loader with the given options
80func NewConfigLoader(configPath string) (ConfigLoader, error) {
81 if configPath == "" {
82 configPath = os.Getenv("DEVSPACE_CONFIG")
83 }
84
85 absPath, err := filepath.Abs(ConfigPath(configPath))
86 if err != nil {
87 return nil, err
88 }
89
90 return &configLoader{
91 absConfigPath: absPath,
92 }, nil
93}
94
95func (l *configLoader) ConfigPath() string {
96 return l.absConfigPath

Callers 3

resolveDependencyMethod · 0.92
NewConfigLoaderMethod · 0.92
TestParseConfigFunction · 0.85

Calls 1

ConfigPathFunction · 0.85

Tested by 1

TestParseConfigFunction · 0.68