api-context #127
Reference in New Issue
Block a user
Delete Branch "api-context"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Change on passing context.Context to all api call functions
@@ -34,3 +35,3 @@// - error: An error if any occurred during the HTTP request, reading the response, or unmarshalling the JSON data.// If no error occurs, this will be nil.func (as *AccountService) CheckAccountStatus(trackingId string) (*models.TrackStatusResponse, error) {func (as *AccountService) CheckAccountStatus(trackingId string, ctx context.Context) (*models.TrackStatusResponse, error) {I believe context should per convention always be the first argument.
https://tip.golang.org/blog/context-and-structs#conclusion