How can we save a text template in a file without doing template.execute

I use “text files” for logging. It may also work on html templates and vanilla templates. This way I store the log:

func stat(msg string) {
	file, err := os.OpenFile("stat.txt", os.O_APPEND|os.O_WRONLY, 0644)

	if err != nil {
		log(err.Error())
		return
	}

	defer file.Close()

	_, err2 := file.WriteString(msg + "\n")

	if err2 != nil {
		log(err.Error())
		return
	}
}