Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 2
    go.dev/play/p/X4liolwTsVL didn't work Commented Jan 20, 2022 at 23:12
  • @ar-siddiqui: peterSO's idea was that you initialized "person" before using it, but here you go, a full working example: go.dev/play/p/_51LQmwicuO Commented Oct 26, 2022 at 18:05
  • 1
    This works for primitives but as soon as you have map[somePrimitive]someStruct{} it won't work, you would need to go further to have a boolean statement for go to work with, see example: go.dev/play/p/LVvS0ojOJpI Commented Feb 2, 2023 at 13:38