MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / resolveOnboardingTarget

Function resolveOnboardingTarget

internal/onboarding/onboarding.go:122–143  ·  view source on GitHub ↗
(configPath string)

Source from the content-addressed store, hash-verified

120}
121
122func resolveOnboardingTarget(configPath string) (onboardingTarget, error) {
123 if configPath == "" {
124 return onboardingTarget{
125 path: config.GetDefaultConfigPath(),
126 exists: false,
127 }, nil
128 }
129
130 if _, err := os.Stat(configPath); err == nil {
131 return onboardingTarget{
132 path: configPath,
133 exists: true,
134 }, nil
135 } else if os.IsNotExist(err) {
136 return onboardingTarget{
137 path: configPath,
138 exists: false,
139 }, nil
140 } else {
141 return onboardingTarget{}, err
142 }
143}
144
145// promptYesNo is a helper function for yes/no prompts.
146func promptYesNo(prompt string) bool {

Callers 2

HandleValidationErrorFunction · 0.85

Calls 1

GetDefaultConfigPathFunction · 0.92

Tested by 1