From e6e9b548cbe027416d5c3924cf4c131d2dd4fe1f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 12 Jan 2024 13:52:55 -0600 Subject: 90% there Signed-off-by: Jeff Carr --- indexHtml.go | 45 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) (limited to 'indexHtml.go') diff --git a/indexHtml.go b/indexHtml.go index fcf9815..e025ea3 100644 --- a/indexHtml.go +++ b/indexHtml.go @@ -2,7 +2,10 @@ package main import ( "fmt" + "strings" "net/http" + + "go.wit.com/log" ) /* @@ -58,7 +61,7 @@ func indexBodyStart(w http.ResponseWriter) { fmt.Fprintln(w, "
") fmt.Fprintln(w, "
") fmt.Fprintln(w, " ") - fmt.Fprintln(w, " ") +// fmt.Fprintln(w, " ") fmt.Fprintln(w, " ") fmt.Fprintln(w, " ") fmt.Fprintln(w, " ") @@ -66,16 +69,46 @@ func indexBodyStart(w http.ResponseWriter) { fmt.Fprintln(w, " ") fmt.Fprintln(w, " ") fmt.Fprintln(w, " ") - fmt.Fprintln(w, " ") +// fmt.Fprintln(w, " ") fmt.Fprintln(w, " ") fmt.Fprintln(w, "") } -func indexBodyRepo(w http.ResponseWriter, repourl string) { - fmt.Fprintln(w, " ") +func insertHTMLnote(w http.ResponseWriter, i int, parts []string) { + log.Info("comment # line:", i, strings.Join(parts, " ")) + fmt.Fprintln(w, " ") +} + +func indexBodyScanConfig(w http.ResponseWriter) { + log.Info("indexBodyScanConfig() START") + for i, line := range configfile { + // log.Info("config file line:", i, line) + fields := strings.Fields(line) + if (len(fields) == 0) { + continue + } + if (fields[0] == "#") { + insertHTMLnote(w, i, fields[0:]) + // log.Info("comment # line:", i, line) + continue + } + if (len(fields) == 2) { + log.Info("short file line:", i, line) + gourl := fields[0] + giturl := fields[1] + indexBodyRepo(w, gourl, giturl, "") + continue + } + log.Info("config file line:", i, line) + } + log.Info("indexBodyScanConfig() END") +} + +func indexBodyRepo(w http.ResponseWriter, gourl string, giturl string, github string) { + // 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, " ") -- cgit v1.2.3
Packagego getgithub mirrorDocumentation
log/ (needed for the gui)
", strings.Join(parts, " "), "
log/ (needed for the gui)
log go.wit.com/log", gourl, " ", gourl, " git.wit.org/wit/log github.com/wit-go/log \"Go