Fix gallery zip scan context (#3433)

* fix zip scan context
* move ValueOnlyContext to utils, use it for zipCtx
This commit is contained in:
xWTF
2023-02-16 07:07:52 +08:00
committed by GitHub
parent d00966c335
commit 6a5a2060bf
4 changed files with 26 additions and 24 deletions

22
pkg/utils/context.go Normal file
View File

@@ -0,0 +1,22 @@
package utils
import (
"context"
"time"
)
type ValueOnlyContext struct {
context.Context
}
func (ValueOnlyContext) Deadline() (deadline time.Time, ok bool) {
return
}
func (ValueOnlyContext) Done() <-chan struct{} {
return nil
}
func (ValueOnlyContext) Err() error {
return nil
}