-
Use structs to group related data.
-
Use named struct literals for anything beyond two or three fields.
-
Use a struct, not a map, when you have a known set of fields. Don’t fight against the type system.
Progress is saved on this device.
Use structs to group related data.
Use named struct literals for anything beyond two or three fields.
Use a struct, not a map, when you have a known set of fields. Don’t fight against the type system.