runtime: chan

This commit is contained in:
xushiwei
2024-07-02 16:00:43 +08:00
parent f5b36ecbac
commit 437edefa0c
5 changed files with 177 additions and 0 deletions

7
_cmptest/fmtdemo/fmt.go Normal file
View File

@@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
fmt.Println("Hello, world")
}

14
_cmptest/iodemo/io.go Normal file
View File

@@ -0,0 +1,14 @@
package main
import (
"io"
"os"
)
func f(w io.Writer) {
w.Write([]byte("Hello, world\n"))
}
func main() {
f(os.Stdout)
}