Inserting zero on integer with golang dgo client, inserts null instead

0 is a zero value in go, and your struct has the tag: omitempty which means “do not render this to json if it’s a zero value”, so you are not sending 0 to dgraph. Remove the struct tag and try again.

I suggest you use some other inserting mechanism with dgo like the protobuf API - which has far fewer caveats.