(ctx context.Context)
| 40 | } |
| 41 | |
| 42 | func ContextGetUpdates(ctx context.Context) map[ORef]WaveObjUpdate { |
| 43 | updatesVal := ctx.Value(waveObjUpdateKey) |
| 44 | if updatesVal == nil { |
| 45 | return nil |
| 46 | } |
| 47 | updates := updatesVal.(*contextUpdatesType) |
| 48 | if len(updates.UpdatesStack) == 1 { |
| 49 | return updates.UpdatesStack[0] |
| 50 | } |
| 51 | rtn := make(map[ORef]WaveObjUpdate) |
| 52 | for _, update := range updates.UpdatesStack { |
| 53 | for k, v := range update { |
| 54 | rtn[k] = v |
| 55 | } |
| 56 | } |
| 57 | return rtn |
| 58 | } |
| 59 | |
| 60 | func ContextGetUpdate(ctx context.Context, oref ORef) *WaveObjUpdate { |
| 61 | updatesVal := ctx.Value(waveObjUpdateKey) |
no test coverage detected