INNER CODE UNIT · Go
delay
platform-engineering-labs/formae · cmd/bundle-examples/main.go:310
delay := base * time.Duration(1<<uint(i-1))
fmt.Printf("bundle-examples: waiting %s before retrying %s (attempt %d/%d)\n", delay, url, i+1, attempts)
time.Sleep(delay)
}
last = probeGET(url)
if last == nil {
return nil
}
}
return last
}
// fetchExamples downloads <repo>@<tag> and extracts the examples/ subtree into
// dst. Returns (hasExamplesDir, filesWritten). Unsupported tar entry types fail.
func fetchExamples(gitURL, tag, dst string) (bool, int, error) {
or, err := validateGH(gitURL)
if err != nil {
return false, 0, err