ynifor

Untitled

Nov 20th, 2024
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. )
  6.  
  7. var Len = 5
  8.  
  9. func main() { // go version 1.21
  10. for i := 0; i < Len; i++ {
  11. go func() {
  12. fmt.Println(i)
  13. }()
  14. }
  15. }
Add Comment
Please, Sign In to add comment