import: move bib files to correct path
Moves the files imported from `bootc-image-builder` directly under `pkg` so they can be imported in reverse. Also fix up any import paths at the same time. Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
parent
7ac659490c
commit
f4bbd3e048
5 changed files with 2 additions and 2 deletions
22
pkg/progress/syncwriter.go
Normal file
22
pkg/progress/syncwriter.go
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package progress
|
||||
|
||||
import (
|
||||
"io"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type syncedWriter struct {
|
||||
mu *sync.Mutex
|
||||
w io.Writer
|
||||
}
|
||||
|
||||
func newSyncedWriter(mu *sync.Mutex, w io.Writer) io.Writer {
|
||||
return &syncedWriter{mu: mu, w: w}
|
||||
}
|
||||
|
||||
func (sw *syncedWriter) Write(p []byte) (n int, err error) {
|
||||
sw.mu.Lock()
|
||||
defer sw.mu.Unlock()
|
||||
|
||||
return sw.w.Write(p)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue