Go ReadFile()

1 개요[ | ]

Go ReadFile()
package main

import (
	"fmt"
	"os"
)

func main() {
	fileBytes, err := os.ReadFile("/etc/hosts")
	if err != nil {
		panic(err)
	}
	fmt.Println(string(fileBytes))
}

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}