mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-10-10 12:13:10 +08:00
27 lines
373 B
Go
27 lines
373 B
Go
package contextutils
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
type withoutCancelCtx struct {
|
|
c context.Context
|
|
}
|
|
|
|
func (withoutCancelCtx) Deadline() (deadline time.Time, ok bool) {
|
|
return
|
|
}
|
|
|
|
func (withoutCancelCtx) Done() <-chan struct{} {
|
|
return nil
|
|
}
|
|
|
|
func (withoutCancelCtx) Err() error {
|
|
return nil
|
|
}
|
|
|
|
func (c withoutCancelCtx) Value(key any) any {
|
|
return c.c.Value(key)
|
|
}
|