Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor refactor to support flyctl interfaces #60

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

benbjohnson
Copy link
Collaborator

@benbjohnson benbjohnson commented May 20, 2024

This pull request moves context-related functions to flyctl so we can implement interfaces for fly.Client & flaps.Client. It also changes GenqClient to a getter function so we can include it in the interface.

Related: superfly/flyctl#3560

Comment on lines -71 to -75
orgSlug, err := resolveOrgSlugForApp(ctx, opts.AppCompact, opts.AppName)
if err != nil {
return nil, fmt.Errorf("failed to resolve org for app '%s': %w", opts.AppName, err)
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code was actually already being called by the caller in flyctl so this removes the duplication. The result of the code in flyctl is set to opts.OrgSlug.

@benbjohnson benbjohnson merged commit 448d1e5 into main May 20, 2024
5 checks passed
@benbjohnson benbjohnson deleted the client-interfaces branch May 20, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant