How to define struct

Define a Go struct using the type keyword followed by the struct name and a block of named fields with their types.

Define a struct using the type keyword, followed by the struct name, the struct keyword, and a block containing field names and their types.

type Int struct {
    i    C.mpz_t
    init bool
}

This creates a new composite type named Int with two fields: i of type C.mpz_t and init of type bool.