From 5f79d6bd5710065585dbb1f0df7ef0740b6aa541 Mon Sep 17 00:00:00 2001 From: Evgeniy Frolov Date: Wed, 11 Dec 2024 15:06:47 +0300 Subject: [PATCH] chore(lint): remove unused code Signed-off-by: Evgeniy Frolov --- Taskfile.dist.yaml | 8 -------- server/pkg/publisher/s3_filesystem.go | 19 ++----------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/Taskfile.dist.yaml b/Taskfile.dist.yaml index e2b0adbb..9045e824 100644 --- a/Taskfile.dist.yaml +++ b/Taskfile.dist.yaml @@ -2,14 +2,6 @@ version: "3" silent: true -vars: - version: "0.0.0" - os: "{{OS}}" - arch: '{{ternary "arm64" ARCH (eq ARCH "arm")}}' - mode: '{{ternary "cgo" "go" (eq .os "linux")}}' - cgoTags: "dfrunsecurity dfrunnetwork dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build cni" - goTags: "dfrunsecurity dfrunnetwork dfrunmount dfssh containers_image_openpgp" - tasks: sign: desc: 'Sign last version tag + origin/main and push signatures. Important vars: "refs".' diff --git a/server/pkg/publisher/s3_filesystem.go b/server/pkg/publisher/s3_filesystem.go index 6e948523..949be63b 100644 --- a/server/pkg/publisher/s3_filesystem.go +++ b/server/pkg/publisher/s3_filesystem.go @@ -161,10 +161,8 @@ func (fs *S3Filesystem) WriteFileStream(ctx context.Context, path string, data i uploader := s3manager.NewUploader(sess) upParams := &s3manager.UploadInput{ - Bucket: &fs.BucketName, - Key: &path, - // DEBUG - // Body: &debugReader{origReader: data, logger: fs.logger}, + Bucket: &fs.BucketName, + Key: &path, Body: data, CacheControl: &cacheControl, } @@ -181,16 +179,3 @@ func (fs *S3Filesystem) WriteFileStream(ctx context.Context, path string, data i return nil } - -// type debugReader struct { -// origReader io.Reader -// logger hclog.Logger -// } - -// func (o *debugReader) Read(p []byte) (int, error) { -// n, err := o.origReader.Read(p) - -// o.logger.Debug(fmt.Sprintf("-- debugReader Read(%p) -> %d, %v", p, n, err)) - -// return n, err -// }