Skip to content

Commit 6f50c48

Browse files
author
Jacob Marble
committed
chore: fix staticcheck and syntax errors
1 parent 7062c8b commit 6f50c48

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
@@ -123,7 +123,7 @@ func (s *KVStore) Update(ctx context.Context, fn func(tx kv.Tx) error) error {
123123

124124
// Backup copies all K:Vs to a writer, in BoltDB format.
125125
func (s *KVStore) Backup(ctx context.Context, w io.Writer) error {
126-
span, ctx := tracing.StartSpanFromContext(ctx)
126+
span, _ := tracing.StartSpanFromContext(ctx)
127127
defer span.Finish()
128128

129129
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
@@ -199,6 +199,7 @@ func (s *BackupService) FetchBackupFile(ctx context.Context, backupID int, backu
199199
return err
200200
}
201201
SetToken(s.Token, req)
202+
req = req.WithContext(ctx)
202203

203204
hc := NewClient(u.Scheme, s.InsecureSkipVerify)
204205
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)