Skip to content

Commit

Permalink
Adds timestamp to temporary file
Browse files Browse the repository at this point in the history
  • Loading branch information
cuducos committed Oct 17, 2024
1 parent d6878f6 commit 2ae1f78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transform/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func newBadgerStorage(m bool) (*badgerStorage, error) {
if m {
opt = badger.DefaultOptions("").WithInMemory(m)
} else {
dir, err = os.MkdirTemp("", badgerFilePrefix)
dir, err = os.MkdirTemp("", fmt.Sprintf("%s-%s",badgerFilePrefix, time.Now().Format("20060102150405")))

Check failure on line 189 in transform/kv.go

View workflow job for this annotation

GitHub Actions / test (windows-latest, 1.21.x)

undefined: time

Check failure on line 189 in transform/kv.go

View workflow job for this annotation

GitHub Actions / lint

undefined: time (compile)

Check failure on line 189 in transform/kv.go

View workflow job for this annotation

GitHub Actions / lint

undefined: time (compile)

Check failure on line 189 in transform/kv.go

View workflow job for this annotation

GitHub Actions / test (windows-latest, 1.22.x)

undefined: time

Check failure on line 189 in transform/kv.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 1.21.x)

undefined: time

Check failure on line 189 in transform/kv.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 1.22.x)

undefined: time
if err != nil {
return nil, fmt.Errorf("error creating temporary key-value storage: %w", err)
}
Expand Down

0 comments on commit 2ae1f78

Please sign in to comment.