diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,6 +1,7 @@ package main import ( + "os" "fmt" "go.wit.com/log" "net/http" @@ -11,6 +12,8 @@ import ( //go:embed files/* var htmlFiles embed.FS +var accessf, clientf *os.File + // remove '?' part and trailing '/' func cleanURL(url string) string { url = "/" + strings.Trim(url, "/") @@ -81,6 +84,8 @@ func findFile(w http.ResponseWriter, filename string) { } func main() { + accessf, _ = os.OpenFile("/home/jcarr/accessclient.log", os.O_RDWR | os.O_CREATE | os.O_APPEND, 0666) + clientf, _ = os.OpenFile("/home/jcarr/httpclient.log", os.O_RDWR | os.O_CREATE | os.O_APPEND, 0666) /* pfile, err := htmlFiles.ReadFile("html/repo.html") if (err != nil) { |
