Hacker News new | past | comments | ask | show | jobs | submit login

No, it's not an alias, they are distinct types. You can't use the types interchangeably (unless you cast them).

Your playground example didn't try to pass a UserID to a function accepting a PostID, but if you do that, you'll see the error:

https://play.golang.org/p/vyiJ_sLzy4O




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: