From 998338b27bda77be2de36afe9d8b2adc8875903d Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Sun, 7 Jan 2024 17:52:40 +0700 Subject: [PATCH] fix: resolve codeql issues --- repository/insert.go | 2 +- repository/read.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repository/insert.go b/repository/insert.go index b59ccd8..41a29f8 100644 --- a/repository/insert.go +++ b/repository/insert.go @@ -13,7 +13,7 @@ import ( ) func (d *Dependency) InsertPaste(ctx context.Context, paste Item) (Item, error) { - ctx, span := tracer.Start(ctx, "InsertPaste") + _, span := tracer.Start(ctx, "InsertPaste") defer span.End() compressedPaste, err := resources.CompressContent(paste.Paste) diff --git a/repository/read.go b/repository/read.go index dd754a0..95f9148 100644 --- a/repository/read.go +++ b/repository/read.go @@ -13,7 +13,7 @@ import ( ) func (d *Dependency) GetItemById(ctx context.Context, id string) (Item, error) { - ctx, span := tracer.Start(ctx, "GetItemById") + _, span := tracer.Start(ctx, "GetItemById") defer span.End() var item = Item{ID: id} @@ -85,7 +85,7 @@ func (d *Dependency) GetItemById(ctx context.Context, id string) (Item, error) { } func (d *Dependency) ReadHash(ctx context.Context, h string) (exists bool, id string, err error) { - ctx, span := tracer.Start(ctx, "ReadHash") + _, span := tracer.Start(ctx, "ReadHash") defer span.End() err = d.DB.View(func(txn *badger.Txn) error {