ctdo.de/file.go

17 lines
192 B
Go

package main
import (
"io/ioutil"
"log"
)
func fileRead(src string) string {
content, err := ioutil.ReadFile(src)
if err != nil {
log.Fatal(err.Error())
}
return string(content)
}