This commit is contained in:
Jeff Carr 2025-07-04 09:33:49 -05:00
parent e2ca78cfb3
commit 33399f18e5
1 changed files with 13 additions and 0 deletions

13
http.go
View File

@ -4,6 +4,7 @@ package gitpb
import ( import (
"bytes" "bytes"
"fmt"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"os/user" "os/user"
@ -59,3 +60,15 @@ func (r *Repos) SubmitReposPB(url string) (*Repos, error) {
return r, nil return r, nil
} }
func (r *Repos) SendPB(w http.ResponseWriter) error {
data, err := r.Marshal()
if err != nil {
log.Info("Marshal() failed:", err)
return err
}
log.Info("SendPB() Marshal() len(data)", len(data))
fmt.Fprintf(w, "%s", data)
return nil
}