mps

morphux package server
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/mps

commit e463ad89880f76ba1d8f1509d7bc24b328c91726
parent 7fcc64e5eb5a56180cace3005fc9e84331a645d5
Author: MrGosti <gostitsog@gmail.com>
Date:   Wed, 29 Mar 2017 09:22:42 +0200

Fix(unreachable error log)

Signed-off-by: MrGosti <gostitsog@gmail.com>

Diffstat:
Mdatabase.go | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/database.go b/database.go @@ -129,8 +129,8 @@ func QueryPkgNameAndCat(name string, category string, state uint8, db *sql.DB) ( err := rows.Scan(&pkg.ID, &pkg.Name, &pkg.State, &pkg.Version, &pkg.Category, &pkg.Description, &pkg.Dependencies, &pkg.Archive, &pkg.SBU, &pkg.ArchiveSize, &pkg.InstalledSize, &pkg.ArchiveHash, &pkg.TimeAddPkg) if err != nil { - return pkg, err log.Fatalln(err) + return pkg, err } return pkg, nil } @@ -148,8 +148,8 @@ func QueryPkgID(id uint64, state uint8, db *sql.DB) (Package, error) { err := rows.Scan(&pkg.ID, &pkg.Name, &pkg.State, &pkg.Version, &pkg.Category, &pkg.Description, &pkg.Dependencies, &pkg.Archive, &pkg.SBU, &pkg.ArchiveSize, &pkg.InstalledSize, &pkg.ArchiveHash, &pkg.TimeAddPkg) if err != nil { - return pkg, err log.Fatalln(err) + return pkg, err } return pkg, nil }