Single field struct vs. custom type

Report a typo

Select the correct features that apply to custom types and single field structs in Go.

Choose one or more options for each row
Custom TypeSingle Field Struct
Can have associated methods
Provides type safety
Can be extended with additional fields
Represents a distinct type from its base
Used for straightforward data representation

Create a free account to access the full topic