Use fmt.Errorf
This commit is contained in:
parent
45069d4fbb
commit
adb424ea03
11 changed files with 50 additions and 60 deletions
|
|
@ -3,7 +3,6 @@ package sync
|
|||
import (
|
||||
"bufio"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"path"
|
||||
"strings"
|
||||
|
|
@ -154,20 +153,20 @@ func ApiGetRemoteExerciceFiles(ps httprouter.Params, _ []byte) (interface{}, err
|
|||
fPath := path.Join(exercice.Path, "files", fname)
|
||||
fSize, _ := getFileSize(GlobalImporter, fPath)
|
||||
ret = append(ret, fic.EFile{
|
||||
Path: fPath,
|
||||
Name: fname,
|
||||
Path: fPath,
|
||||
Name: fname,
|
||||
Checksum: digests[fname],
|
||||
Size: fSize,
|
||||
Size: fSize,
|
||||
})
|
||||
}
|
||||
return ret, nil
|
||||
} else {
|
||||
return nil, errors.New(fmt.Sprintf("%q", errs))
|
||||
return nil, fmt.Errorf("%q", errs)
|
||||
}
|
||||
} else {
|
||||
return nil, errors.New(fmt.Sprintf("%q", errs))
|
||||
return nil, fmt.Errorf("%q", errs)
|
||||
}
|
||||
} else {
|
||||
return nil, errors.New(fmt.Sprintf("%q", errs))
|
||||
return nil, fmt.Errorf("%q", errs)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue