map stream set nil
This commit is contained in:
@@ -20,6 +20,9 @@ func (m *MapStream) GetStream(key string, ns ...string) (io.Reader, error) {
|
||||
}
|
||||
|
||||
func (m *MapStream) SetStream(key string, r io.Reader, ns ...string) error {
|
||||
if r == nil {
|
||||
return m.Set(key, nil, ns...)
|
||||
}
|
||||
b, err := ioutil.ReadAll(r)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user