I have:
err := downloadFile(url, directory, filename) if err != nil { log.Error(err) }
How can I write a test without visiting an external server to download a file from it? Is it possible with mocking? If so, do you have any examples or hints?
Aucun commentaire:
Enregistrer un commentaire