Skip to content

Instantly share code, notes, and snippets.

View JonayMedina's full-sized avatar

JonayMedina JonayMedina

  • Freelancer
  • Venezuela
View GitHub Profile
@james2doyle
james2doyle / getXML.go
Last active January 15, 2025 21:29
Use HTTP to GET and parse XML in golang
// tweaked from: https://stackoverflow.com/a/42718113/1170664
func getXML(url string) ([]byte, error) {
resp, err := http.Get(url)
if err != nil {
return []byte{}, fmt.Errorf("GET error: %v", err)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return []byte{}, fmt.Errorf("Status error: %v", resp.StatusCode)
@brenes
brenes / README.md
Last active April 6, 2025 02:38
CSV de paises, con nombre en castellano, ingles, codigo ISO y prefijo telefónico del país