diff options
| author | Jeff Carr <[email protected]> | 2024-01-12 04:14:09 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-12 04:14:09 -0600 |
| commit | 83ad5524015e155e6250743e01eeed7234ccb5a5 (patch) | |
| tree | 6d2aa0e43faf6ee383c5739d1df837264841da01 /repoHTML.go | |
initial commit
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'repoHTML.go')
| -rw-r--r-- | repoHTML.go | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/repoHTML.go b/repoHTML.go new file mode 100644 index 0000000..f30fcca --- /dev/null +++ b/repoHTML.go @@ -0,0 +1,48 @@ +package main + +import ( + "fmt" + // "log" + "net/http" +) + + +/* +<!DOCTYPE html> +<html> + <head> + <meta name="go-import" content="go.wit.com/gui/gui git https://git.wit.org/gui/gui"> + <meta name="go-source" content="go.wit.com/gui/gui https://git.wit.org/gui/gui https://git.wit.org/gui/tree/master{/dir} https://git.wit.org/gui/gui/tree/master{/dir}/{file}#L{line}"> + <meta http-equiv="refresh" content="0; url=https://git.wit.org/gui/gui"> + </head> + <body> + Nothing to see here. Please <a href="https://git.wit.org/gui/gui">move along</a>. + </body> +</html> +*/ + +func doGui(w http.ResponseWriter, path string) { + fmt.Fprintln(w, "<!DOCTYPE html>") + fmt.Fprintln(w, "<html>") + fmt.Fprintln(w, "<head>") + // fmt.Fprintln(w, + fmt.Fprintln(w, "<meta name=\"go-import\" content=\"", "go.wit.com/gui/gui", "git", "https://git.wit.org/gui/gui\">") + fmt.Fprintln(w, "<meta name=\"go-source\" content=\"", "go.wit.com/gui/gui", "https://git.wit.org/gui/gui", "https://git.wit.org/gui/tree/master{/dir}", "https://git.wit.org/gui/gui/", "tree/master{/dir}/{file}#L{line}", "\"", ">") + + fmt.Fprintln(w, "<meta http-equiv=\"refresh\" content=\"0; url=", "https://git.wit.org/gui/gui", "\">") + fmt.Fprintln(w, "</head>") + fmt.Fprintln(w, "<body>") + fmt.Fprintln(w, "Nothing to see here. Please <a href=\"https://git.wit.org/gui/gui\">move along</a>.\"") + fmt.Fprintln(w, "</body>") + fmt.Fprintln(w, "</html>") + + /* + var tmp string + tmp = r.URL.String() + if tmp == "/gui" { + findFile(w) + return + } + fmt.Fprintln(w, "OK") + */ +} |
