Skip to content

Commit b0a3c95

Browse files
committed
Add pointer loading example from comment
1 parent e01a6ce commit b0a3c95

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

coderd/pointer/pointer_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ func TestHandle(t *testing.T) {
1818
ctx, value := ptr.Load(ctx)
1919
require.Equal(t, "hello", value)
2020
ptr.Store("world")
21+
ctx, value = ptr.Load(ctx)
22+
require.Equal(t, "hello", value)
2123
_, value = ptr.Load(ctx)
2224
require.Equal(t, "hello", value)
2325
})

0 commit comments

Comments
 (0)