show dev version
This commit is contained in:
parent
dc905f7a39
commit
40689e8761
Notes:
Jeff Carr
2025-02-15 19:03:57 -06:00
// `autogen:go.mod` module go.wit.com/apps/utils/gowebd go 1.22 toolchain go1.23.6 require ( go.wit.com/dev/alexflint/arg v1.5.5 go.wit.com/lib/gui/shell v0.22.26 go.wit.com/lib/protobuf/forgepb v0.0.81 go.wit.com/lib/protobuf/gitpb v0.0.80 go.wit.com/log v0.22.16 ) require ( github.com/destel/rill v0.7.0 // indirect github.com/go-cmd/cmd v1.4.3 // indirect github.com/google/uuid v1.6.0 // indirect go.wit.com/dev/alexflint/scalar v1.2.4 // indirect go.wit.com/lib/protobuf/zoopb v0.0.27 // indirect golang.org/x/sys v0.30.0 // indirect google.golang.org/protobuf v1.36.5 // indirect ) // `autogen:go.sum` github.com/destel/rill v0.7.0 h1:LJUbeMACaO+/e8rUNk940kYVESD/dbrhAp6M14IjQ0c= github.com/destel/rill v0.7.0/go.mod h1:srKuXzvGqINUEGYR5b/iwvW+L9/S35RxVHWGYbXNoO4= github.com/go-cmd/cmd v1.4.3 h1:6y3G+3UqPerXvPcXvj+5QNPHT02BUw7p6PsqRxLNA7Y= github.com/go-cmd/cmd v1.4.3/go.mod h1:u3hxg/ry+D5kwh8WvUkHLAMe2zQCaXd00t35WfQaOFk= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= go.wit.com/dev/alexflint/arg v1.5.5 h1:c4jgIb4OvHjnCMRNSjOa1sNLl6WDxV6tIkMVezR9hCk= go.wit.com/dev/alexflint/arg v1.5.5/go.mod h1:nH3F6TJDaAUgnLkC0WgRN/H047YfN1TYKaWPYr6B8lo= go.wit.com/dev/alexflint/scalar v1.2.4 h1:zmBeEkObwz1lcelwfGNYP2GS6SQ9e0tdv7JdHwMZEEk= go.wit.com/dev/alexflint/scalar v1.2.4/go.mod h1:kCNO1Fo5LnnK6+qa+zYhP5fdgfC1C+vx1ti99Md+FAM= go.wit.com/lib/gui/shell v0.22.26 h1:F+7aadEujsTgyBEs5ptKGL6N72reDkGd/7b0Ju4HeTU= go.wit.com/lib/gui/shell v0.22.26/go.mod h1:Km5o+DLU5up5jvTEum9wiTdsZZG/EUNERVzn2wJ6DBE= go.wit.com/lib/protobuf/forgepb v0.0.81 h1:Y+v99Igi4UzkltNL09sSTGNf5bx6YC5NLW/mBx3ZqRM= go.wit.com/lib/protobuf/forgepb v0.0.81/go.mod h1:FqVUE6ezeRNbOdQWiy/h6GZYbn8UkgkMFty3mxaCRAk= go.wit.com/lib/protobuf/gitpb v0.0.80 h1:5AeyG0BVLKWzU9zUt4doEDa7eEh+UKWGEcE1ibhSgqM= go.wit.com/lib/protobuf/gitpb v0.0.80/go.mod h1:fsefHgERvcJpQ4YMGYOVM7lep+yYH+LsLJolhVWCrjc= go.wit.com/lib/protobuf/zoopb v0.0.27 h1:Hse85KN5nxFPkg6dk2Z96kEQRI4I4mQ66cZW0Nf/1so= go.wit.com/lib/protobuf/zoopb v0.0.27/go.mod h1:CNZmHSG+H41Gw1xuJvW1E4ef5eQCPptzIg1U5nfSGV4= go.wit.com/log v0.22.16 h1:E0Vd0Z2ILtfjhs7J/CQ4g13DK1jtQiYl6l5KOBGsZoA= go.wit.com/log v0.22.16/go.mod h1:/c5Uj30sWRQ4B5ei2ElB6Q8Si/cK6v+KbxnH208KD84= golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= // `autogen:`
11
indexHtml.go
11
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, " <th>Package (IPv6 only)</th>")
|
||||
fmt.Fprintln(w, " <th>Documentation</th>")
|
||||
fmt.Fprintln(w, " <th>Version</th>")
|
||||
fmt.Fprintln(w, " <th>Age</th>")
|
||||
fmt.Fprintln(w, " <th>Dev Version</th>")
|
||||
fmt.Fprintln(w, " <th>Age</th>")
|
||||
fmt.Fprintln(w, " <th>Description</th>")
|
||||
// fmt.Fprintln(w, " <th>Authoritative sources (IPv6 only)</th>")
|
||||
// fmt.Fprintln(w, " <th></th>")
|
||||
|
@ -99,18 +97,19 @@ func indexBodyRepo(w http.ResponseWriter, gourl string, giturl string, desc stri
|
|||
// fmt.Fprintln(w, " <td>"+gourl+"</td>")
|
||||
fmt.Fprintln(w, " <td> <a href=\"//"+gourl+"\">"+gourl+"</a></td>")
|
||||
fmt.Fprintln(w, " <td> <a href=\"//pkg.go.dev/"+gourl+"\"> <img src=\"goReference.svg\" alt=\"pkg.go.dev\" /> </a> </td>")
|
||||
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, " <td>"+version+"</td>") // version
|
||||
fmt.Fprintln(w, " <td>"+dver+"</td>") // dev version
|
||||
fmt.Fprintln(w, " <td>"+vtime+"</td>") // dev version
|
||||
fmt.Fprintln(w, " <td></td>") // dev version
|
||||
fmt.Fprintln(w, " <td>"+desc+"</td>")
|
||||
// fmt.Fprintln(w, " <td> <a href=\"//"+gourl+"\">"+giturl+"</a></td>")
|
||||
fmt.Fprintln(w, " </tr>")
|
||||
|
|
Loading…
Reference in New Issue