struct field

One named value inside a struct, such as Name or Port, with its own type.

In more detail

A field name starting with a capital letter is exported and visible to other packages and to encoders such as encoding/json. Field names document the shape of your data. A pointer field can mark a setting as not given, since its zero value is nil.

Example

target.Port

Related terms

Taught in

References