diff --git a/main.go b/main.go index 061ee47..7bc1123 100644 --- a/main.go +++ b/main.go @@ -21,29 +21,33 @@ func okHandler(w http.ResponseWriter, r *http.Request) { return } if tmp == "/test" { - findFile(w) + findFile(w, "files/repo.html") + return + } + if tmp == "/skeleton.v2.css" { + findFile(w, "files/skeleton.v2.css") return } if tmp == "/gui" { // doGui(w, "/gui/gui") return } - fmt.Fprintln(w, "OK") + fmt.Fprintln(w, "BAD", tmp) } -func findFile(w http.ResponseWriter) { - fmt.Fprintln(w, "GOT TEST?") - pfile, err := htmlFiles.ReadFile("files/repo.html") +func findFile(w http.ResponseWriter, filename string) { + // fmt.Fprintln(w, "GOT TEST?") + pfile, err := htmlFiles.ReadFile(filename) if (err != nil) { - log.Println("ERROR: err") + log.Println("ERROR:", err) // w.Write(pfile) return } var repohtml string repohtml = string(pfile) - fmt.Fprintln(w, "GOT GUI?", repohtml) - log.Println("repo.html:", repohtml) + fmt.Fprintln(w, repohtml) + log.Println("findFile() found internal file:", filename) // w.Close() /* filename = "/tmp/" + name + ".so" diff --git a/repoHTML.go b/repoHTML.go index b9c9e29..51a759b 100644 --- a/repoHTML.go +++ b/repoHTML.go @@ -24,18 +24,19 @@ import ( */ func doGui(w http.ResponseWriter, gourl string, realurl string) { - fmt.Fprintln(w, "go repo =", gourl, "real url =", realurl) + realurl = "https://" + realurl + log.Info("go repo =", gourl, "real url =", realurl) fmt.Fprintln(w, "") fmt.Fprintln(w, "") fmt.Fprintln(w, "") // fmt.Fprintln(w, - fmt.Fprintln(w, "") - fmt.Fprintln(w, "") + fmt.Fprintln(w, "") + fmt.Fprintln(w, "") - fmt.Fprintln(w, "") + fmt.Fprintln(w, "") fmt.Fprintln(w, "") fmt.Fprintln(w, "") - fmt.Fprintln(w, "Nothing to see here. Please move along.\"") + fmt.Fprintln(w, "Nothing to see here. Please move along.\"") fmt.Fprintln(w, "") fmt.Fprintln(w, "")