diff options
| author | Jeff Carr <[email protected]> | 2025-07-08 15:48:59 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-07-08 15:48:59 -0500 |
| commit | 1c439782941d21d8b26bf5590b4f3d4b69da70ad (patch) | |
| tree | eef7eccf791eb0b179b1a1efa2aa3c0a0178bc80 /http.go | |
| parent | d0616fae03cdf2160d2dce57be1cf44772b52a34 (diff) | |
add debugging printf'sv0.0.104
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -17,7 +17,11 @@ func httpPost(url string, data []byte) ([]byte, error) { var req *http.Request req, err = http.NewRequest(http.MethodPost, url, bytes.NewBuffer(data)) - // log.Info("httpPost() with len", len(data), "url", url) + log.Info("httpPost() with len", len(data), "url", url) + if err != nil { + log.Error(err) + return nil, err + } usr, _ := user.Current() req.Header.Set("author", usr.Username) @@ -38,6 +42,7 @@ func httpPost(url string, data []byte) ([]byte, error) { return body, err } + log.Info("gitpb.httpPost() worked", url) return body, nil } @@ -53,8 +58,10 @@ func (r *Repos) SubmitReposPB(url string) (*Repos, error) { log.Info("httpPost() failed:", err) return nil, err } + log.Info("httpPost() worked with url:", url, "len(body) =", len(body)) if err := r.Unmarshal(body); err != nil { - log.Info("Unmarshal() failed:", err) + log.Info("SubmitReposPB() Unmarshal() failed:", err) + log.Printf("%s\n", body) return nil, err } |
