Put implements DecodingLayerContainer interface.
(d DecodingLayer)
| 148 | |
| 149 | // Put implements DecodingLayerContainer interface. |
| 150 | func (dl DecodingLayerMap) Put(d DecodingLayer) DecodingLayerContainer { |
| 151 | for _, typ := range d.CanDecode().LayerTypes() { |
| 152 | if dl == nil { |
| 153 | dl = make(map[LayerType]DecodingLayer) |
| 154 | } |
| 155 | dl[typ] = d |
| 156 | } |
| 157 | return dl |
| 158 | } |
| 159 | |
| 160 | // Decoder implements DecodingLayerContainer interface. |
| 161 | func (dl DecodingLayerMap) Decoder(typ LayerType) (DecodingLayer, bool) { |
nothing calls this directly
no test coverage detected