This commit is contained in:
nemunaire 2016-01-23 13:19:28 +01:00
commit 645f40f0c6
8 changed files with 32 additions and 37 deletions

View file

@ -44,7 +44,7 @@ func createExerciceFile(theme fic.Theme, exercice fic.Exercice, args []string, b
return exercice.ImportFile(pathname, uf.URI)
}
func getCloudFile(pathname string, dest string) (error) {
func getCloudFile(pathname string, dest string) error {
client := http.Client{}
if req, err := http.NewRequest("GET", CloudDAVBase+pathname, nil); err != nil {
return err
@ -58,7 +58,7 @@ func getCloudFile(pathname string, dest string) (error) {
if fd, err := os.Create(dest); err != nil {
return err
} else {
defer fd.Close();
defer fd.Close()
if resp.StatusCode != http.StatusOK {
return errors.New(resp.Status)