map stream set nil

This commit is contained in:
Bel LaPointe
2021-07-17 11:15:41 -06:00
parent dab532e7f0
commit e040e04fcb

View File

@@ -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 { 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) b, err := ioutil.ReadAll(r)
if err != nil { if err != nil {
return err return err