Avoid Atoi to avoid int convertion
This commit is contained in:
parent
8702db568c
commit
0f48b27a04
11 changed files with 32 additions and 39 deletions
|
|
@ -67,9 +67,9 @@ func GetFiles() ([]EFile, error) {
|
|||
}
|
||||
|
||||
// GetFile retrieves the file with the given id.
|
||||
func GetFile(id int) (f EFile, err error) {
|
||||
func GetFile(id int64) (f EFile, err error) {
|
||||
err = DBQueryRow("SELECT id_file, origin, path, name, cksum, size FROM exercice_files WHERE id_file = ?", id).Scan(&f.Id, &f.origin, &f.Path, &f.Name, &f.Checksum, &f.Size)
|
||||
return f, err
|
||||
return
|
||||
}
|
||||
|
||||
// GetFileByPath retrieves the file that should be found at the given location.
|
||||
|
|
|
|||
Reference in a new issue