Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
amagoosebitch committed Jun 14, 2023
1 parent e9fea7c commit 66928bb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/pg/wal_prefetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/wal-g/tracelog"
"github.com/wal-g/wal-g/internal"
"github.com/wal-g/wal-g/internal/databases/postgres"
"io"
"github.com/wal-g/wal-g/internal/multistorage"
"io"
)

const WalPrefetchShortDescription = `Used for prefetching process forking
Expand Down
2 changes: 1 addition & 1 deletion internal/abool/abool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func TestToogleAfterOverflow(t *testing.T) {
}

// make sure overflow happened
var valueAfterToggle int32 = *(*int32)(v)
var valueAfterToggle = *(*int32)(v)
if valueAfterToggle >= valueBeforeToggle {
t.Fatalf("Overflow does not happen as expected, before %d, after: %d", valueBeforeToggle, valueAfterToggle)
}
Expand Down
1 change: 1 addition & 0 deletions internal/compress_and_encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func (err CompressAndEncryptError) Error() string {

// CompressAndEncrypt compresses input to a pipe reader. Output must be used or
// pipe will block.
// nolint: revive, lll
func CompressAndEncrypt(source io.Reader, compressor compression.Compressor, crypter crypto.Crypter, compressSize *int64) io.Reader {
compressedReader, dstWriter := io.Pipe()

Expand Down
6 changes: 5 additions & 1 deletion internal/databases/postgres/streaming_base_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ func (bb *StreamingBaseBackup) Upload(uploader internal.Uploader, bundleFiles in
// Upload the extra tar
if len(bb.streamer.Tee) > 0 {
teeTar := ioextensions.NewNamedReaderImpl(bb.streamer.TeeIo, bb.FileName())
teeCompressedFile := internal.CompressAndEncrypt(teeTar, bb.uploader.Compression(), internal.ConfigureCrypter(), bb.uploader.CompressedSizePtr())
teeCompressedFile := internal.CompressAndEncrypt(
teeTar,
bb.uploader.Compression(),
internal.ConfigureCrypter(),
bb.uploader.CompressedSizePtr())
teeFileName := fmt.Sprintf("pg_control.tar.%s", bb.uploader.Compression().FileExtension())
teeFilePath := storage.JoinPath(bb.BackupName(), internal.TarPartitionFolderName, teeFileName)
err = bb.uploader.Upload(teeFilePath, teeCompressedFile)
Expand Down

0 comments on commit 66928bb

Please sign in to comment.