diff options
| author | Jeff Carr <[email protected]> | 2025-07-04 09:33:49 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-07-04 09:42:57 -0500 |
| commit | 33399f18e5add881c61e9d121f7929b4f6f3d49b (patch) | |
| tree | 6f1db9d58de87a132707315c8522819f7884a227 /http.go | |
| parent | e2ca78cfb33d8bfea81232de042fa1ced61bf192 (diff) | |
SendPB()
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 +} |
