MCPcopy
hub / github.com/wavetermdev/waveterm / ContextUpdatesBeginTx

Function ContextUpdatesBeginTx

pkg/waveobj/ctxupdate.go:87–95  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

85}
86
87func ContextUpdatesBeginTx(ctx context.Context) context.Context {
88 updatesVal := ctx.Value(waveObjUpdateKey)
89 if updatesVal == nil {
90 return ctx
91 }
92 updates := updatesVal.(*contextUpdatesType)
93 updates.UpdatesStack = append(updates.UpdatesStack, make(map[ORef]WaveObjUpdate))
94 return ctx
95}
96
97func ContextUpdatesCommitTx(ctx context.Context) {
98 updatesVal := ctx.Value(waveObjUpdateKey)

Callers 2

WithTxFunction · 0.92
WithTxRtnFunction · 0.92

Calls 1

ValueMethod · 0.80

Tested by

no test coverage detected