GetDyeingKey gets dyeing key from the context.
(ctx context.Context)
| 221 | |
| 222 | // GetDyeingKey gets dyeing key from the context. |
| 223 | func GetDyeingKey(ctx context.Context) (string, bool) { |
| 224 | tc, ok := currentFromContext(ctx) |
| 225 | if ok { |
| 226 | if tc.reqStatus != nil { |
| 227 | if dyeingKey, exists := tc.reqStatus[StatusDyedKey]; exists { |
| 228 | return dyeingKey, true |
| 229 | } |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | return "", false |
| 234 | } |
| 235 | |
| 236 | // SetDyeingKey set dyeing key to the tars current. |
| 237 | func SetDyeingKey(ctx context.Context, dyeingKey string) bool { |
no test coverage detected