You can add extra meta information to Go structs in the form of tags. Here are some examples of use cases.
In this case, the json:"gateway" is used by the json package to encode the value of Gateway into the key gateway in the corresponding json object.
Example:
n := NetworkInterface{
Gateway : "foo"
}
json.Marshal(n)
// will output `{"gateway":"foo",...}`