mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ci: fix go->spawn in the examples in vlib/context/README.md too
This commit is contained in:
parent
bf00e9bdb8
commit
27d8f2371d
@ -42,7 +42,7 @@ fn main() {
|
|||||||
// the internal routine started by gen.
|
// the internal routine started by gen.
|
||||||
gen := fn (mut ctx context.Context) chan int {
|
gen := fn (mut ctx context.Context) chan int {
|
||||||
dst := chan int{}
|
dst := chan int{}
|
||||||
go fn (mut ctx context.Context, dst chan int) {
|
spawn fn (mut ctx context.Context, dst chan int) {
|
||||||
mut v := 0
|
mut v := 0
|
||||||
ch := ctx.done()
|
ch := ctx.done()
|
||||||
for {
|
for {
|
||||||
@ -187,4 +187,4 @@ fn main() {
|
|||||||
assert value == dump(f(ctx, key))
|
assert value == dump(f(ctx, key))
|
||||||
assert not_found_value == dump(f(ctx, 'color'))
|
assert not_found_value == dump(f(ctx, 'color'))
|
||||||
}
|
}
|
||||||
```
|
```
|
Loading…
x
Reference in New Issue
Block a user