From 3242eba34d9739871aa404e0f1adb2d8b730351b Mon Sep 17 00:00:00 2001 From: Geoff Greer Date: Thu, 21 Nov 2024 10:58:55 -0800 Subject: [PATCH] Remove unused SqliteError. Cache clearing log line should be debug, not info. --- pkg/uhttp/dbcache.go | 11 ----------- pkg/uhttp/wrapper.go | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/pkg/uhttp/dbcache.go b/pkg/uhttp/dbcache.go index 21409127..5b08851b 100644 --- a/pkg/uhttp/dbcache.go +++ b/pkg/uhttp/dbcache.go @@ -46,17 +46,6 @@ type CacheRow struct { Url string } -// SqliteError implement sqlite error code. -type SqliteError struct { - Code int `json:"Code,omitempty"` /* The error code returned by SQLite */ - ExtendedCode int `json:"ExtendedCode,omitempty"` /* The extended error code returned by SQLite */ - err string -} - -func (b *SqliteError) Error() string { - return b.err -} - const ( failStartTransaction = "Failed to start a transaction" errQueryingTable = "Error querying cache table" diff --git a/pkg/uhttp/wrapper.go b/pkg/uhttp/wrapper.go index f78aaf99..02e494bf 100644 --- a/pkg/uhttp/wrapper.go +++ b/pkg/uhttp/wrapper.go @@ -73,7 +73,7 @@ func ClearCaches(ctx context.Context) error { l.Debug("clearing caches") var err error for _, cache := range caches { - l.Info("clearing cache", zap.String("cache", fmt.Sprintf("%T", cache)), zap.Any("stats", cache.Stats(ctx))) + l.Debug("clearing cache", zap.String("cache", fmt.Sprintf("%T", cache)), zap.Any("stats", cache.Stats(ctx))) err = cache.Clear(ctx) if err != nil { err = errors.Join(err, err)