mirror of
https://github.com/ChenKaiLiuG/find_your_own_fxxking_problem.git
synced 2026-06-17 16:54:24 +00:00
add golang version
要跟我一輩子寫 golang 嗎?
This commit is contained in:
16
run/print.go
Normal file
16
run/print.go
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
filename := "找找自己問題.txt"
|
||||||
|
data, err := os.ReadFile(filename)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("無法讀取檔案 '%v': %v\n", filename, err)
|
||||||
|
} else {
|
||||||
|
fmt.Print(string(data))
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user