Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"os"
"path/filepath"
"strings"
"sync"

"github.com/CycloneDX/cyclonedx-go"
xscutils "github.com/jfrog/jfrog-client-go/xsc/services/utils"
Expand Down Expand Up @@ -448,6 +449,7 @@ func isArtifactChecksumsMatch(remoteFileDetails *fileutils.FileDetails, localFil

// LineDecoratorWriter is a line decorator that writes each line to the underlying writer with an optional prefix and suffix.
type LineDecoratorWriter struct {
mu sync.Mutex
w io.Writer
prefix []byte
suffix []byte
Expand All @@ -465,6 +467,8 @@ func NewLineDecoratorWriter(w io.Writer, prefix, suffix string) *LineDecoratorWr
}

func (p *LineDecoratorWriter) Write(data []byte) (n int, err error) {
p.mu.Lock()
defer p.mu.Unlock()
n = len(data)
p.buf = append(p.buf, data...)
for {
Expand Down
Loading