...
Run Format

Source file test/goprint.go

Documentation: test

     1  // run
     2  
     3  // Copyright 2011 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  // Test that println can be the target of a go statement.
     8  
     9  package main
    10  
    11  import (
    12  	"runtime"
    13  	"time"
    14  )
    15  
    16  func main() {
    17  	go println(42, true, false, true, 1.5, "world", (chan int)(nil), []int(nil), (map[string]int)(nil), (func())(nil), byte(255))
    18  	for runtime.NumGoroutine() > 1 {
    19  		time.Sleep(10*time.Millisecond)
    20  	}
    21  }
    22  

View as plain text