When you declare a new type, the declaration is constructed to provide the compiler with size and representation information, similar to how the built-in types work.

    There are two ways to declare a userdefined type in Go.

    • struct