add debugging printf's
This commit is contained in:
parent
d0616fae03
commit
1c43978294
11
http.go
11
http.go
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,13 @@ import (
|
|||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
)
|
||||
|
||||
// redo this. use go-git2 ?
|
||||
func (repo *Repo) allCommits() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
// this is dumb
|
||||
func (repo *Repo) AllCommits() error {
|
||||
// tags := []string{"cd", "%(creatordate)", "%(*authordate)", "%(refname)", "%(subject)"}
|
||||
// format := strings.Join(tags, "_,,,_%")
|
||||
|
@ -27,6 +34,7 @@ func (repo *Repo) AllCommits() error {
|
|||
repo.Times.NewestCommit = timestamppb.New(tmp)
|
||||
return nil
|
||||
}
|
||||
*/
|
||||
|
||||
// reload the tags
|
||||
func (repo *Repo) reloadGitTags() error {
|
||||
|
|
Loading…
Reference in New Issue