Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add salesforce input plugin #3075

Merged
merged 2 commits into from
Aug 8, 2017
Merged

add salesforce input plugin #3075

merged 2 commits into from
Aug 8, 2017

Conversation

rody
Copy link
Contributor

@rody rody commented Aug 1, 2017

Gather metrics about limits and usage for a Salesforce organisation.

Required for all PRs:

  • [ X] Signed CLA.
  • Associated README.md updated.
  • [ X] Has appropriate unit tests.

snake := matchFirstCap.ReplaceAllString(str, "${1}_${2}")
snake = matchAllCap.ReplaceAllString(snake, "${1}_${2}")
return strings.ToLower(snake)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use this function https://github.com/influxdata/telegraf/blob/master/internal/internal.go#L160 for converting to snake case.

}

if resp.StatusCode != http.StatusOK {
return l, fmt.Errorf("Salesforce responded with unexpected status code %d", resp.StatusCode)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space char in the message

Gather metrics about limits and usage for a Salesforce organization.
- remove salesforce.toSnakeCase() and use internal.SnakeCase() instead
- remove extra space character in message
@rody
Copy link
Contributor Author

rody commented Aug 7, 2017

@danielnelson Thanks for the review!
I've update the pull request accordingly.
I'm not sure if I should squash the 2 commits or keep them separated. Let me know if you want me to squash them.

@danielnelson
Copy link
Contributor

Either way is fine, I always merge pull requests with "squash and merge".

@danielnelson danielnelson merged commit d9deb26 into influxdata:master Aug 8, 2017
maxunt pushed a commit that referenced this pull request Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants