.proto changes

This commit is contained in:
Jeff Carr 2025-01-13 08:11:56 -06:00
parent 73ef74d479
commit 7fa4889dce
1 changed files with 7 additions and 7 deletions

View File

@ -27,8 +27,8 @@ func getPatchset(w http.ResponseWriter, pbname string) {
fmt.Fprintf(w, msg)
return
}
var m *forgepb.Patchs
m = new(forgepb.Patchs)
var m *forgepb.Patchset
m = new(forgepb.Patchset)
if err := m.Unmarshal(data); err != nil {
msg := fmt.Sprintf("proto.Unmarshal() failed on %s len=%d\n", filename, len(data))
fmt.Printf(msg)
@ -62,8 +62,8 @@ func listPatchsets(w http.ResponseWriter) {
fmt.Println(entry.Name(), err)
continue
}
var p *forgepb.Patchs
p = new(forgepb.Patchs)
var p *forgepb.Patchset
p = new(forgepb.Patchset)
err = p.Unmarshal(bytes)
if err != nil {
fmt.Fprintln(w, entry.Name(), err)
@ -80,8 +80,8 @@ func listPatchsets(w http.ResponseWriter) {
func savePatchset(w http.ResponseWriter, msg []byte) {
log.Info("proto.Unmarshal() try message len", len(msg))
var m *forgepb.Patchs
m = new(forgepb.Patchs)
var m *forgepb.Patchset
m = new(forgepb.Patchset)
if err := m.Unmarshal(msg); err != nil {
log.Info("proto.Unmarshal() failed on wire message len", len(msg))
log.Info("error =", err)
@ -89,7 +89,7 @@ func savePatchset(w http.ResponseWriter, msg []byte) {
}
log.Info("GOT patchset:", len(msg))
fmt.Fprintln(w, "GOT patchset:", len(msg))
all := m.SortByFilename()
all := m.Patches.SortByFilename()
for all.Scan() {
repo := all.Next()
log.Info("filename:", repo.Filename)