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

Added support for ints, uints and float32 #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bt
Copy link

@bt bt commented Mar 20, 2019

I added support for various int and uint types, as well as float32.

I understand that your library was targeting unmarshalled JSON structs, so this might not be in scope. I am using colorjson to pretty-print my structs for debugging purposes and noticed that since these types aren't implemented, they return as an empty string in the output.

Also, unsure if there's a better way to implement this; Golang doesn't seem to like grouping int/uint types together and then type casting, so I have to make a case for each. The other option would of course be to use reflect but it's quite a bit slower.

@gavincarr
Copy link

Could this be merged @TylerBrock ?

@TylerBrock
Copy link
Owner

Ah yeah, sorry for the delay. I might be able to spend some time on PRs this week. Stay tuned.

@TylerBrock
Copy link
Owner

It doesn't look like we can merge this one as is because of the included go.mod.

I'm also on the fence for including this functionality as the library is meant to print unmarshalled json... I'll have to think on that a bit.

@bt
Copy link
Author

bt commented Jan 27, 2022

It doesn't look like we can merge this one as is because of the included go.mod.

I'm also on the fence for including this functionality as the library is meant to print unmarshalled json... I'll have to think on that a bit.

Understood, hence I mentioned in my PR.

Let me know if you'd like me to remove the go.mod for the merge, if you'd accept.

@TylerBrock
Copy link
Owner

TylerBrock commented Jan 27, 2022 via email

@bt
Copy link
Author

bt commented Jan 28, 2022

Yes please do, lets start there and review what’s left.
On Wed, Jan 26, 2022 at 10:51 PM Bertram Truong @.> wrote: It doesn't look like we can merge this one as is because of the included go.mod. I'm also on the fence for including this functionality as the library is meant to print unmarshalled json... I'll have to think on that a bit. Understood, hence I mentioned in my PR. Let me know if you'd like me to remove the go.mod for the merge, if you'd accept. — Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACERZYUYEDFRMNI6FR6RYLUYC6NPANCNFSM4G72YEBQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.>


-Tyler

Done! The go.mod file has been removed.

Let me know if there's any further requirements for the PR and I'll see what I can do.

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

3 participants