Skip to content

Commit 3a8b4e2

Browse files
author
Jacob Marble
committed
chore: fix staticcheck and syntax errors
1 parent 81df899 commit 3a8b4e2

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

bolt/kv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (s *KVStore) Update(ctx context.Context, fn func(tx kv.Tx) error) error {
128128

129129
// Backup copies all K:Vs to a writer, in BoltDB format.
130130
func (s *KVStore) Backup(ctx context.Context, w io.Writer) error {
131-
span, ctx := tracing.StartSpanFromContext(ctx)
131+
span, _ := tracing.StartSpanFromContext(ctx)
132132
defer span.Finish()
133133

134134
return s.db.View(func(tx *bolt.Tx) error {

http/backup_service.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ func (s *BackupService) FetchBackupFile(ctx context.Context, backupID int, backu
198198
return err
199199
}
200200
SetToken(s.Token, req)
201+
req = req.WithContext(ctx)
201202

202203
hc := NewClient(u.Scheme, s.InsecureSkipVerify)
203204
hc.Timeout = httpClientTimeout

storage/engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ func (e *Engine) CreateBackup(ctx context.Context) (int, []string, error) {
705705
// FetchBackupFile writes a given backup file to the provided writer.
706706
// After a successful write, the internal copy is removed.
707707
func (e *Engine) FetchBackupFile(ctx context.Context, backupID int, backupFile string, w io.Writer) error {
708-
span, ctx := tracing.StartSpanFromContext(ctx)
708+
span, _ := tracing.StartSpanFromContext(ctx)
709709
defer span.Finish()
710710

711711
e.mu.RLock()

tsdb/tsm1/file_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ func (f *FileStore) CreateSnapshot(ctx context.Context) (backupID int, backupDir
12351235

12361236
// create the tmp directory and add the hard links. there is no longer any shared
12371237
// mutable state.
1238-
err := os.Mkdir(backupDirFullPath, 0777)
1238+
err = os.Mkdir(backupDirFullPath, 0777)
12391239
if err != nil {
12401240
return 0, "", err
12411241
}

0 commit comments

Comments
 (0)