summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-12 11:39:36 -0600
committerJeff Carr <[email protected]>2024-01-12 11:39:36 -0600
commita870d3bc76c701734e7e58e2b731e472b12d1a82 (patch)
treee6023b0692e95c559427b59ea052a4188c5bbe5d
parent23fa94cbcddf3090a1ffc6793c69d3a19bfcb341 (diff)
starting to work
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--main.go6
-rw-r--r--repoHTML.go3
2 files changed, 7 insertions, 2 deletions
diff --git a/main.go b/main.go
index 120d759..061ee47 100644
--- a/main.go
+++ b/main.go
@@ -16,8 +16,12 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
tmp = r.URL.String()
url, repourl := findkey(tmp)
log.Info("url =", url, "repo url =", repourl)
+ if repourl != "" {
+ doGui(w, url, repourl)
+ return
+ }
if tmp == "/test" {
- // findFile(w)
+ findFile(w)
return
}
if tmp == "/gui" {
diff --git a/repoHTML.go b/repoHTML.go
index f33bb71..b9c9e29 100644
--- a/repoHTML.go
+++ b/repoHTML.go
@@ -23,7 +23,8 @@ import (
</html>
*/
-func doGui(w http.ResponseWriter, path string) {
+func doGui(w http.ResponseWriter, gourl string, realurl string) {
+ fmt.Fprintln(w, "go repo =", gourl, "real url =", realurl)
fmt.Fprintln(w, "<!DOCTYPE html>")
fmt.Fprintln(w, "<html>")
fmt.Fprintln(w, "<head>")