WithMethod returns a new updated context with the tag KeyMethod set to the given value.
(parent context.Context, method string)
| 596 | |
| 597 | // WithMethod returns a new updated context with the tag KeyMethod set to the given value. |
| 598 | func WithMethod(parent context.Context, method string) context.Context { |
| 599 | ctx, err := tag.New(parent, tag.Upsert(KeyMethod, method)) |
| 600 | Check(err) |
| 601 | return ctx |
| 602 | } |
| 603 | |
| 604 | // SinceMs returns the time since startTime in milliseconds (as a float). |
| 605 | func SinceMs(startTime time.Time) float64 { |
no test coverage detected