From 943496f93179b1f9110b7d143f380fa16f64fe20 Mon Sep 17 00:00:00 2001 From: mchavez Date: Tue, 27 Aug 2024 11:21:58 -0600 Subject: [PATCH] Code review changes --- pkg/uhttp/dbcache.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/uhttp/dbcache.go b/pkg/uhttp/dbcache.go index edb58b14..5a645199 100644 --- a/pkg/uhttp/dbcache.go +++ b/pkg/uhttp/dbcache.go @@ -43,14 +43,14 @@ func NewDBCache(ctx context.Context, cfg CacheConfig) (*DBCache, error) { // Connect to db db, err := sql.Open("sqlite", filepath.Join(cacheDir, "lcache.db")) if err != nil { - l.Debug("Failed to open SQLite database", zap.Error(err)) + l.Debug("Failed to open database", zap.Error(err)) return &DBCache{}, err } // Create cache table _, err = db.Exec("CREATE TABLE IF NOT EXISTS http_cache(id INTEGER PRIMARY KEY, key NVARCHAR, data BLOB, expiration INTEGER)") if err != nil { - l.Debug("Failed to create cache table in SQLite database", zap.Error(err)) + l.Debug("Failed to create cache table in database", zap.Error(err)) return &DBCache{}, err } @@ -231,7 +231,7 @@ func (d *DBCache) Has(ctx context.Context, key string) (bool, error) { return false, nil } -// IsNilConnection check if the database connection is nil +// IsNilConnection check if the database connection is nil. func (d *DBCache) IsNilConnection() bool { return d.db == nil }