mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-01 22:31:15 +00:00
fix compile error after dep upgrade
This commit is contained in:
parent
9b93e6bae7
commit
ebfea36f21
1 changed files with 2 additions and 1 deletions
|
@ -43,7 +43,7 @@ type mux struct {
|
||||||
func (m *mux) Create(key string) (io.ReadCloser, io.WriteCloser, error) {
|
func (m *mux) Create(key string) (io.ReadCloser, io.WriteCloser, error) {
|
||||||
rc, wc, err := m.cache.Get(key)
|
rc, wc, err := m.cache.Get(key)
|
||||||
if rc != nil {
|
if rc != nil {
|
||||||
rc = &closeOnceReader{ReadCloser: rc}
|
rc = &closeOnceReader{ReaderAt: rc, ReadCloser: rc}
|
||||||
}
|
}
|
||||||
if wc != nil {
|
if wc != nil {
|
||||||
wc = &closeOnceWriter{WriteCloser: wc}
|
wc = &closeOnceWriter{WriteCloser: wc}
|
||||||
|
@ -67,6 +67,7 @@ func (m *mux) Remove(key string) error {
|
||||||
// attempting to close the fscache reader more than
|
// attempting to close the fscache reader more than
|
||||||
// once results in a panic.
|
// once results in a panic.
|
||||||
type closeOnceReader struct {
|
type closeOnceReader struct {
|
||||||
|
io.ReaderAt
|
||||||
io.ReadCloser
|
io.ReadCloser
|
||||||
once sync.Once
|
once sync.Once
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue