mdempsky/unconvert

Thanks for making the exact tool that I wanted!

Closed this issue · 3 comments

It's been on my long term TODO list to create exactly this tool, but now I don't have to. I just wanted to say thank you!

My motivation is that after switching between various OpenGL and vector math packages, I had accumulated some number of explicit type conversions, and it was hard to be sure which ones were still necessary. So I wanted to be able to simplify them, and I knew it was possible to write a tool that'd do it automatically and reliably.

Also thanks to @dominikh for sharing it with me.

I have one question so far, does this tool support pure Go packages that import other cgo packages (i.e., Go packages that use cgo, aka import "C")?

ctxt.CgoEnabled = false
may be a hint.

Are there plans to support Cgo in the future?

Would you be willing to accept a patch that adds support, if it's doable?

I had set CgoEnabled=false only because I don't have C cross-compilers for all of the target platforms, so I need to disable cgo when running with -all. I don't think there's any reason to disable it normally though.

I did a quick one-off test and it seems to work with cgo now. Let me know if you have any problems.

Cheers!

It works great for me, thank you!