From 3d94edd024da17de76cc39078d98bc19e5ef7306 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 8 Jan 2025 00:59:38 -0600 Subject: [PATCH] code cleanup in aisle 9 --- http.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/http.go b/http.go index dc8ec14..ee489e9 100644 --- a/http.go +++ b/http.go @@ -1,14 +1,10 @@ package main import ( - "errors" "fmt" "net/http" - "os" - "path/filepath" "strings" - "go.wit.com/lib/gui/repolist" "go.wit.com/log" ) @@ -88,9 +84,6 @@ func okHandler(w http.ResponseWriter, r *http.Request) { setCurrentRepo(repo, "HTTP", "doRelease() ?") return - case "/testNext": - testNext() - return case "/fixNext": check := me.forge.FindByGoPath(me.current.GetGoPath()) if check == nil { @@ -102,13 +95,19 @@ func okHandler(w http.ResponseWriter, r *http.Request) { findOk = true return case "/showNext": - showNext() + check := me.forge.FindByGoPath(me.current.GetGoPath()) + if check == nil { + log.Info("boo, current is missing", me.current.GetGoPath()) + return + } + me.forge.HumanPrintRepo(check) return case "/list": me.forge.PrintReleaseReport(me.forge.Repos) return case "/releaseList": me.forge.PrintReleaseReport(me.found) + me.forge.PrintHumanTable(me.found) return default: log.Info("BAD URL = " + route) @@ -128,6 +127,7 @@ func startHTTP() { } } +/* func testNext() { // re-scans the go.sum file. DOES NOT MODIFY ANYTHING check := me.forge.FindByGoPath(me.current.GetGoPath()) @@ -210,3 +210,4 @@ func showNext() { log.Info(repolist.ReleaseReportHeader()) log.Info(me.forge.StandardReleaseHeader(me.current, "notsure")) } +*/