From 40689e87610ce8829b9fc0c33bc46c5db40c1208 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 8 Feb 2025 22:14:51 -0600 Subject: [PATCH] show dev version --- indexHtml.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/indexHtml.go b/indexHtml.go index db5e35f..48a1a01 100644 --- a/indexHtml.go +++ b/indexHtml.go @@ -4,8 +4,6 @@ import ( "fmt" "net/http" "strings" - - "go.wit.com/log" ) func indexHeader(w http.ResponseWriter) { @@ -39,8 +37,8 @@ func indexBodyStart(w http.ResponseWriter) { fmt.Fprintln(w, " Package (IPv6 only)") fmt.Fprintln(w, " Documentation") fmt.Fprintln(w, " Version") - fmt.Fprintln(w, " Age") fmt.Fprintln(w, " Dev Version") + fmt.Fprintln(w, " Age") fmt.Fprintln(w, " Description") // fmt.Fprintln(w, " Authoritative sources (IPv6 only)") // fmt.Fprintln(w, " ") @@ -99,18 +97,19 @@ func indexBodyRepo(w http.ResponseWriter, gourl string, giturl string, desc stri // fmt.Fprintln(w, " "+gourl+"") fmt.Fprintln(w, " "+gourl+"") fmt.Fprintln(w, " \"pkg.go.dev\" ") - var vtime, version string + var vtime, version, dver string gourl = strings.TrimSpace(gourl) if repo, ok := gitMap[gourl]; ok { version = repo.GetLastTag() age := repo.NewestAge() vtime = formatDuration(age) + dver = repo.GetDevelVersion() } - log.Info("gopath", gourl, "dur", vtime, "version", version) + // log.Info("gopath", gourl, "dur", vtime, "version", version) fmt.Fprintln(w, " "+version+"") // version + fmt.Fprintln(w, " "+dver+"") // dev version fmt.Fprintln(w, " "+vtime+"") // dev version - fmt.Fprintln(w, " ") // dev version fmt.Fprintln(w, " "+desc+"") // fmt.Fprintln(w, " "+giturl+"") fmt.Fprintln(w, " ")