mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:34:15 +08:00
11 lines
201 B
Go
11 lines
201 B
Go
package main
|
|
|
|
import "os"
|
|
|
|
func main() {
|
|
os.Stdout.WriteString("hello, world\n")
|
|
f, _ := os.OpenFile("test", os.O_CREATE|os.O_WRONLY, 0)
|
|
defer f.Close()
|
|
f.WriteString("hello, world in a file\n")
|
|
}
|