map stream set nil

master
Bel LaPointe 2021-07-17 11:15:41 -06:00
parent dab532e7f0
commit e040e04fcb
1 changed files with 3 additions and 0 deletions

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