Get the value set for key.
(key string)
| 214 | |
| 215 | // Get the value set for key. |
| 216 | func (m Metadata) Get(key string) (string, bool) { |
| 217 | for k, v := range m.Iter() { |
| 218 | if k == key { |
| 219 | return v, true |
| 220 | } |
| 221 | } |
| 222 | return "", false |
| 223 | } |
| 224 | |
| 225 | // WithTenant encodes the metadata as a tenant-prefixed string. |
| 226 | // The format is "tenantID:key1=val1:key2=val2" with keys sorted alphabetically. |