summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-07-04 09:33:49 -0500
committerJeff Carr <[email protected]>2025-07-04 09:42:57 -0500
commit33399f18e5add881c61e9d121f7929b4f6f3d49b (patch)
tree6f1db9d58de87a132707315c8522819f7884a227 /http.go
parente2ca78cfb33d8bfea81232de042fa1ced61bf192 (diff)
SendPB()
Diffstat (limited to 'http.go')
-rw-r--r--http.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/http.go b/http.go
index 59a955c..c47269d 100644
--- a/http.go
+++ b/http.go
@@ -4,6 +4,7 @@ package gitpb
import (
"bytes"
+ "fmt"
"io/ioutil"
"net/http"
"os/user"
@@ -59,3 +60,15 @@ func (r *Repos) SubmitReposPB(url string) (*Repos, error) {
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
+}