You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ParseDestinations silently drops the first URL when loaded from a config file #5
ParseDestinations skips index 0 of the URL slice unconditionally. That is correct for CLI invocation (where index 0 is the subcommand, e.g. check), but it is wrong when URLs come from the YAML config file — silently dropping the first configured destination.
validate-config is affected too — it calls ParseDestinations(config.URLs) directly with no synthetic prefix (connectivity.go:38).
Impact
Silent data loss: a configured destination is never checked, but connectivity check still reports success on the remaining ones. This makes the tool unreliable as a pre-deploy gate.
Suggested fix
Strip the subcommand at the source (in GetURLs) rather than in ParseDestinations. For example:
for_, url:=rangeos.Args[2:] { // start after the subcommandconfig.URLs=append(config.URLs, Url{Url: url})
}
and have ParseDestinations iterate every element with no special-casing of index 0.
Activity