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 support for marshaling uint64 in client. #3033

Merged
merged 1 commit into from
Jun 18, 2015
Merged

Conversation

toddboom
Copy link
Contributor

I spotted this when testing out Telegraf. I don't see any reason it shouldn't get handled here.

@otoolep
Copy link
Contributor

otoolep commented Jun 18, 2015

Seems sane.

On Wednesday, June 17, 2015, Todd Persen notifications@github.com wrote:

I spotted this when testing out Telegraf. I don't see any reason it

shouldn't get handled here.

You can view, comment on, or merge this pull request online at:

#3033
Commit Summary

  • Add support for marshaling uint64 in client.

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#3033.

@@ -923,6 +923,8 @@ func (p Fields) MarshalBinary() []byte {
b = append(b, []byte(strconv.FormatInt(int64(t), 10))...)
case int32:
b = append(b, []byte(strconv.FormatInt(int64(t), 10))...)
case uint64:
b = append(b, []byte(strconv.FormatInt(int64(t), 10))...)
Copy link
Contributor

Choose a reason for hiding this comment

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

Using strconv.FormatUint() will avoid a type conversion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch!

toddboom added a commit that referenced this pull request Jun 18, 2015
Add support for marshaling `uint64` in client.
@toddboom toddboom merged commit 67d561f into master Jun 18, 2015
@toddboom toddboom deleted the client-marshal-uint64 branch June 18, 2015 22:43
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.

None yet

4 participants