diff --git a/ghdb/ghdb.go b/ghdb/ghdb.go index cbba23a..3943be4 100644 --- a/ghdb/ghdb.go +++ b/ghdb/ghdb.go @@ -79,6 +79,7 @@ func (db *ErrDB) checkUpdate() error { func (db *ErrDB) RefreshCache() (err error) { if db.cachedVersion == (versionData{}) { version := db.Cache.Get("version") + println("Unmarshaling version", version) json.Unmarshal(([]byte)(version), &db.cachedVersion) } newVersion, err := db.fetchGhDBVersion() @@ -150,6 +151,7 @@ func (db *ErrDB) GetErrorDesc(id int) (desc *mcla.ErrorDesc, err error) { return } desc = new(mcla.ErrorDesc) + println("Unmarshaling error", id, buf) if err = json.Unmarshal(([]byte)(buf), desc); err != nil { db.Cache.Remove(cacheKey) desc = nil @@ -206,6 +208,7 @@ func (db *ErrDB) GetSolution(id int) (sol *mcla.SolutionDesc, err error) { return } sol = new(mcla.SolutionDesc) + println("Unmarshaling solution", id, buf) if err = json.Unmarshal(([]byte)(buf), sol); err != nil { db.Cache.Remove(cacheKey) sol = nil