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

move main.go to be within the cmd directory structure and push all subcommands down one layer #813

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

komish
Copy link
Contributor

@komish komish commented Oct 25, 2022

This PR is in preparation for exposing code at the top layer of the directory structure to be library code. We have to move main.go into cmd so that the import path can be correct for library code, and also probably should anyway as it doesn't hurt anything.

Signed-off-by: Jose R. Gonzalez jose@flutes.dev

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 25, 2022
Copy link
Contributor

@acornett21 acornett21 left a comment

Choose a reason for hiding this comment

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

Can't main live in /cmd without having a sub folder? cmd/prflight/cmd seems like a weird package path.

@coveralls
Copy link

coveralls commented Oct 25, 2022

Coverage Status

coverage: 83.402%. remained the same
when pulling 19efb51 on komish:move-main-dot-go
into 7a7320f on redhat-openshift-ecosystem:main.

@acornett21
Copy link
Contributor

Can't main live in /cmd without having a sub folder? cmd/prflight/cmd seems like a weird package path.

Looking at a few other repos, it looks like this pattern is actually common.

@komish
Copy link
Contributor Author

komish commented Oct 25, 2022

Can't main live in /cmd without having a sub folder? cmd/prflight/cmd seems like a weird package path.

I don’t think so. The package for the entry point must be main, but the cobra commands probably shouldn’t live in the main package.

@tkrishtop
Copy link
Contributor

hi @komish sorry for the failed job, we got an issue with the folder permissions in Dallas, it is now fixed

@openshift-ci
Copy link

openshift-ci bot commented Oct 26, 2022

@sebrandon1: changing LGTM is restricted to collaborators

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

@bcrochet bcrochet left a comment

Choose a reason for hiding this comment

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

/lgtm

Awesome that the changes were pretty limited and just a 'git mv' in most cases.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 27, 2022
Copy link

@skattoju4 skattoju4 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Oct 27, 2022

@skattoju4: changing LGTM is restricted to collaborators

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

@skattoju skattoju left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2022
…bcommands down one layer

Signed-off-by: Jose R. Gonzalez <jose@flutes.dev>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 31, 2022
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 31, 2022
Copy link
Contributor

@bcrochet bcrochet left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 31, 2022
@openshift-ci
Copy link

openshift-ci bot commented Oct 31, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bcrochet, komish, sebrandon1, skattoju, skattoju4

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [bcrochet,komish,skattoju]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@komish komish merged commit 577ab6c into redhat-openshift-ecosystem:main Oct 31, 2022
@komish komish deleted the move-main-dot-go branch October 31, 2022 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants