mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-23 03:17:43 +08:00
commands: Added Request#SetStream
This commit is contained in:
parent
12a6a87b2c
commit
4303dccee9
@ -16,6 +16,7 @@ type Request interface {
|
||||
SetOption(name string, val interface{})
|
||||
Arguments() []string
|
||||
Stream() io.Reader
|
||||
SetStream(io.Reader)
|
||||
|
||||
ConvertOptions(options map[string]Option) error
|
||||
}
|
||||
@ -53,6 +54,11 @@ func (r *request) Stream() io.Reader {
|
||||
return r.in
|
||||
}
|
||||
|
||||
// SetStream sets the value of the input stream Reader
|
||||
func (r *request) SetStream(in io.Reader) {
|
||||
r.in = in
|
||||
}
|
||||
|
||||
type converter func(string) (interface{}, error)
|
||||
|
||||
var converters = map[reflect.Kind]converter{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user