Must be something simple, but I cannot seem to figure out. I keep getting "no such file or directory" error. Thought the Create function is to create a new file? package main
import (
"log"
"os"
)
func main() {
f, err := os.Create("~/golang-server.log")
defer f.Close()
if err != nil {
panic(err.Error())
}
log.SetOutput(f)
}