In the github package, the reason is that most structures are designed to serialize / deserialize from json from the github api.
The reason they use *int instead of int is because the null pointer value is nil and the null int value is 0 . This allows the client to distinguish between "this field was not included in the response" and "the value of this field is zero."
This is especially useful for things like times when, if you don't have null types, you will have many dates like 00-00-0000.
source share