INNER CODE UNIT · Go
client
demoiselle/signer · automacao-importador/verificar-cadeias-v12.go:192
client := &http.Client{Timeout: 20 * time.Second}
resp, err := client.Get(INDEX_URL)
if err != nil {
fmt.Printf("Erro ao acessar %s: %v\n", INDEX_URL, err)
return nil
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
re := regexp.MustCompile(`href="([^"]+\.p7b)"`)
matches := re.FindAllStringSubmatch(string(body), -1)
seen := make(map[string]bool)
var files []string
for _, m := range matches {
parts := strings.Split(m[1], "/")
fn := parts[len(parts)-1]
if !seen[fn] {