diff options
| author | Jeff Carr <[email protected]> | 2024-01-12 11:39:36 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-12 11:39:36 -0600 |
| commit | a870d3bc76c701734e7e58e2b731e472b12d1a82 (patch) | |
| tree | e6023b0692e95c559427b59ea052a4188c5bbe5d | |
| parent | 23fa94cbcddf3090a1ffc6793c69d3a19bfcb341 (diff) | |
starting to work
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | main.go | 6 | ||||
| -rw-r--r-- | repoHTML.go | 3 |
2 files changed, 7 insertions, 2 deletions
@@ -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>") |
