Put implements DecodingLayerContainer interface.
(d DecodingLayer)
| 113 | |
| 114 | // Put implements DecodingLayerContainer interface. |
| 115 | func (dl DecodingLayerArray) Put(d DecodingLayer) DecodingLayerContainer { |
| 116 | TYPES: |
| 117 | for _, typ := range d.CanDecode().LayerTypes() { |
| 118 | for i := range dl { |
| 119 | if dl[i].typ == typ { |
| 120 | dl[i].dec = d |
| 121 | continue TYPES |
| 122 | } |
| 123 | } |
| 124 | dl = append(dl, decodingLayerElem{typ, d}) |
| 125 | } |
| 126 | return dl |
| 127 | } |
| 128 | |
| 129 | // Decoder implements DecodingLayerContainer interface. |
| 130 | func (dl DecodingLayerArray) Decoder(typ LayerType) (DecodingLayer, bool) { |
nothing calls this directly
no test coverage detected