Join joins any number of mds into a single MD. The order of values for each key is determined by the order in which the mds containing those values are presented to Join.
(mds ...MD)
| 147 | // The order of values for each key is determined by the order in which the mds |
| 148 | // containing those values are presented to Join. |
| 149 | func Join(mds ...MD) MD { |
| 150 | out := MD{} |
| 151 | for _, md := range mds { |
| 152 | for k, v := range md { |
| 153 | out[k] = append(out[k], v...) |
| 154 | } |
| 155 | } |
| 156 | return out |
| 157 | } |
| 158 | |
| 159 | type mdIncomingKey struct{} |
| 160 | type mdOutgoingKey struct{} |
no outgoing calls