I want to distinguish two different ID numbers in my code, which are
virtually int. If I used int as types of ID variables, I got confused.
I created two types, "IDa" and "IDb" as aliases of int.
However, the function which was defined to receive IDa receives int value.
Here is example: http://play.golang.org/p/ZuHtgV7Poh
In this code, I expected the go compiler to stop with errors. I found that
the compiler will generate error if I use a pointer to pass a value to a
Is there any way without pointer to prohibit type cast when using alias
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
For more options, visit https://groups.google.com/d/optout.