Not a hard question. It’s sum types! (Or enums, tagged unions, or whatever you want to call them).

  • spacedogroy@feddit.uk
    ·
    11 months ago

    I do hate the way enums are in Go. It's just barely better than using a string or int in most cases.