In v2.0.0, all API methods (both Request methods and Service methods) require a context.Context as their first argument. The previous *WithContext suffix methods have been removed.
Migration Patterns:
- For a quick migration, use
context.Background() or context.TODO(). - For production code, use a context with a timeout (e.g.,
context.WithTimeout).
// Quick migration
issue, resp, err := client.Issue.Get(context.Background(), "KEY-123", nil)
// Better: use a proper context with timeout
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
issue, resp, err := client.Issue.Get(ctx, "KEY-123", nil)