rm old code

This commit is contained in:
Jeff Carr 2025-09-08 16:18:59 -05:00
parent 4c5ded025f
commit be62079b78
1 changed files with 0 additions and 36 deletions

View File

@ -1,12 +1,8 @@
package main package main
import ( import (
"net/http"
"go.wit.com/lib/protobuf/forgepb" "go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/lib/protobuf/httppb" "go.wit.com/lib/protobuf/httppb"
"go.wit.com/log"
) )
func addNewPatches(pb *forgepb.Patches, reqPB *httppb.HttpRequest) *forgepb.Patches { func addNewPatches(pb *forgepb.Patches, reqPB *httppb.HttpRequest) *forgepb.Patches {
@ -46,22 +42,6 @@ func sendPendingPatchsets(pb *forgepb.Patchsets, reqPB *httppb.HttpRequest) *for
return allPatchsetsPB return allPatchsetsPB
} }
/*
func handlePatches(w http.ResponseWriter, pb *forgepb.Patches) error {
route := pb.HttpRequest.Route
log.Info("GOT PATCHES ROUTE", route, "with # patches =", pb.Len())
if strings.HasPrefix(route, "/patches/old") {
} else if strings.HasPrefix(route, "/patches/new") {
log.Info("add new patches")
} else {
log.Info("unknown route", route)
}
return nil
}
*/
func makeReposPB(reqPB *httppb.HttpRequest) (*gitpb.Repos, error) { func makeReposPB(reqPB *httppb.HttpRequest) (*gitpb.Repos, error) {
pb := gitpb.NewRepos() pb := gitpb.NewRepos()
err := pb.Unmarshal(reqPB.ServerData) err := pb.Unmarshal(reqPB.ServerData)
@ -84,19 +64,3 @@ func sendPatchesError(w http.ResponseWriter, r *forgepb.Patches, err error) erro
log.Info("send error back to user", err) log.Info("send error back to user", err)
return nil return nil
} }
/*
func marshalPatchesPB(r *http.Request, msg []byte) (*forgepb.Patches, error) {
pb := forgepb.NewPatches()
if err := pb.Unmarshal(msg); err != nil {
log.Info("proto.Unmarshal() failed on wire message len", len(msg), err)
// add the header
pb.AddHttpToPB(r)
return pb, err
}
// add the header
pb.AddHttpToPB(r)
return pb, nil
}
*/