summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-07-07 17:33:06 -0500
committerJeff Carr <[email protected]>2025-07-07 18:54:37 -0500
commitcba9b430649fb345352c58b7f64aa1d39e673796 (patch)
treeba39f4e64baaaa2040ed8f23468672b8eb354046 /http.go
parentfde780869eddd1f2765c9de3c17c38d67fa76174 (diff)
patch to load git.pb files
Diffstat (limited to 'http.go')
-rw-r--r--http.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/http.go b/http.go
index 030983e..ffbc5e3 100644
--- a/http.go
+++ b/http.go
@@ -45,8 +45,18 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
}
if route == "/lookup" {
- // repos, err := lookupRepos(w, msg)
- lookupRepos(w, msg)
+ found, err := lookupRepos(msg)
+ if err != nil {
+ return
+ }
+ // marshal the protobuf to xfer over the socket
+ data, err := found.Marshal()
+ if err != nil {
+ log.Info("repos.Marshal() to wire failed", err)
+ return
+ }
+
+ w.Write(data)
return
}