diff options
| author | Jeff Carr <[email protected]> | 2025-07-02 12:53:34 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-07-02 12:54:28 -0500 |
| commit | fde780869eddd1f2765c9de3c17c38d67fa76174 (patch) | |
| tree | 3b3acf3c9dd95369aa006c71c5ab95ce8a765244 /doPatchsets.go | |
| parent | 61cc346f6cb121dcba3ee5e457ba587d58646621 (diff) | |
recieve a gitpb.Repos protobufv0.0.5
Diffstat (limited to 'doPatchsets.go')
| -rw-r--r-- | doPatchsets.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doPatchsets.go b/doPatchsets.go index 53e2789..55a1f0a 100644 --- a/doPatchsets.go +++ b/doPatchsets.go @@ -9,6 +9,7 @@ import ( "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/forgepb" + "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" ) @@ -164,3 +165,18 @@ func savePatchset(w http.ResponseWriter, msg []byte) { regfile.Write(msg) regfile.Close() } + +func lookupRepos(w http.ResponseWriter, msg []byte) (*gitpb.Repos, error) { + log.Info("proto.Unmarshal() try message len", len(msg)) + m := gitpb.NewRepos() + if err := m.Unmarshal(msg); err != nil { + log.Info("gitpb.Repos.Unmarshal() failed. len(msg) =", len(msg), err) + return m, err + } + log.Info("GOT repos:", len(msg)) + for repo := range m.IterAll() { + log.Infof("repo:%s,%s\n", repo.Namespace, repo.FullPath) + // fmt.Fprintln(w, "repo:", repo.FullPath, repo.Namespace) + } + return m, nil +} |
