As discuses in comment we should NOT use pointers for URL struct tags.
Example :
Currently (wrong) -
|
type GetAuditLogOptions struct { |
|
Phrase *string `url:"phrase,omitempty"` // A search phrase. (Optional.) |
|
Include *string `url:"include,omitempty"` // Event type includes. Can be one of "web", "git", "all". Default: "web". (Optional.) |
|
Order *string `url:"order,omitempty"` // The order of audit log events. Can be one of "asc" or "desc". Default: "desc". (Optional.) |
|
|
|
ListCursorOptions |
|
} |
Correct -
type GetAuditLogOptions struct {
Phrase string `url:"phrase,omitempty"`
Include string `url:"include,omitempty"`
Order string `url:"order,omitempty"`
ListCursorOptions
}
Task :
- Update all URL option structs to remove pointer fields
- Update the
structfield linter to catch this issue going forward
As discuses in comment we should NOT use pointers for URL struct tags.
Example :
Currently (wrong) -
go-github/github/orgs_audit_log.go
Lines 15 to 21 in e5024aa
Correct -
Task :
structfieldlinter to catch this issue going forward