コード例 #1
0
ファイル: tx.go プロジェクト: sky-uk/newrelic-go-agent
// FromContext returns a newrelic.Tx from the context.
func FromContext(ctx context.Context) (Tx, bool) {
	t, ok := ctx.Value(txKey).(Tx)
	return t, ok
}