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

> In Golang how do I represent that a type is either type A or type B

generics provide one approach to this, but, in general, you don't -- you find another solution to your problem




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: