ctdo.de/file.go

17 lines
192 B
Go
Raw Normal View History

package main
import (
"io/ioutil"
"log"
)
func fileRead(src string) string {
content, err := ioutil.ReadFile(src)
if err != nil {
2023-01-28 17:44:11 +00:00
log.Fatal(err.Error())
}
return string(content)
}