MCPcopy Create free account
hub / github.com/amitsaha/gitbackup / resolveConfigPath

Function resolveConfigPath

config_file.go:28–33  ·  view source on GitHub ↗

resolveConfigPath returns the config path to use. If configPath is non-empty, it is returned as-is. Otherwise, the OS-specific default path is returned.

(configPath string)

Source from the content-addressed store, hash-verified

26// If configPath is non-empty, it is returned as-is.
27// Otherwise, the OS-specific default path is returned.
28func resolveConfigPath(configPath string) (string, error) {
29 if configPath != "" {
30 return configPath, nil
31 }
32 return defaultConfigPath()
33}
34
35// fileConfig represents the YAML configuration file structure.
36// Migration-related flags are intentionally excluded as they

Callers 4

buildConfigFunction · 0.85
handleInitConfigFunction · 0.85
loadConfigFileFunction · 0.85
handleValidateConfigFunction · 0.85

Calls 1

defaultConfigPathFunction · 0.85

Tested by

no test coverage detected