mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-02 06:47:51 +08:00
commands: Added Request#SetContext()
This commit is contained in:
parent
48bd73c530
commit
289bce6bdb
@ -28,6 +28,7 @@ type Request interface {
|
||||
Stream() io.Reader
|
||||
SetStream(io.Reader)
|
||||
Context() *Context
|
||||
SetContext(Context)
|
||||
|
||||
ConvertOptions(options map[string]Option) error
|
||||
}
|
||||
@ -84,6 +85,10 @@ func (r *request) Context() *Context {
|
||||
return &r.ctx
|
||||
}
|
||||
|
||||
func (r *request) SetContext(ctx Context) {
|
||||
r.ctx = ctx
|
||||
}
|
||||
|
||||
type converter func(string) (interface{}, error)
|
||||
|
||||
var converters = map[reflect.Kind]converter{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user