(no title)
njs12345 | 5 years ago
It still provides a documentation benefit of course.
EDIT: Whoops, yes, as lentil points out, they are indeed distinct types not aliases. So it does provide the benefit of the Rust solution.
njs12345 | 5 years ago
It still provides a documentation benefit of course.
EDIT: Whoops, yes, as lentil points out, they are indeed distinct types not aliases. So it does provide the benefit of the Rust solution.
lentil|5 years ago
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