colorjson
colorjson copied to clipboard
Added support for ints, uints and float32
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.
Could this be merged @TylerBrock ?
Ah yeah, sorry for the delay. I might be able to spend some time on PRs this week. Stay tuned.
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.
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.
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 https://github.com/TylerBrock/colorjson/pull/2#issuecomment-1022821996, 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
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.