Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,9 @@ func (c *client) GetAllInto(destination interface {
}

for _, document := range response.Documents {
if destination.Add != nil {
err = destination.Add(document)
if err != nil {
log.Info("Error when adding document", "error", err)
}
err = destination.Add(document)
if err != nil {
log.Info("Error when adding document", "error", err)
}
}

Expand Down Expand Up @@ -180,11 +178,9 @@ func (c *client) GetAllInto(destination interface {
}

for _, document := range response.Documents {
if destination.Add != nil {
destination.Add(document)
if err != nil {
log.Info("Error when adding document", "error", err)
}
destination.Add(document)
if err != nil {
log.Info("Error when adding document", "error", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (c *client) getUserToken(userID string) (token *oauth2.Token) {

_, err = client.Get(c.me)
if err == nil {
fmt.Errorf("Fetch should return an error if no refresh token is set")
log.Errorf("Fetch should return an error if no refresh token is set")
}

token, err = client.Transport.(*oauth2.Transport).Source.Token()
Expand Down