-
Notifications
You must be signed in to change notification settings - Fork 49
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
Refactoring to reduce package count #83
Conversation
* Consolidate util and utils into the same package * Move internal/onboard into internal/cli/onboard * Move maybeOnboard into the onboard package
} | ||
return nil | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has just been moved into here from the separate onboarding package.
import ( | ||
"github.com/ooni/probe-cli/nettests" | ||
) | ||
package nettests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All nettests have been flattened into the root nettests package. I think eventually we should move all the nettest specific code into probe-engine as there is currently so many levels of indirection going on here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I believe we should aim for slowly moving code in probe-engine.
t.Fatal(err) | ||
} | ||
nt := HTTPInvalidRequestLine{} | ||
ctl := NewController(nt, ctx, res) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very basic smoke test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a general rule, I tend to put as much code as possible into the internal
package so I am not surprising people when I do refactoring. This is something we could consider for the future.
For now, 🐳
import ( | ||
"github.com/ooni/probe-cli/nettests" | ||
) | ||
package nettests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I believe we should aim for slowly moving code in probe-engine.
Refactoring to reduce package count
What I am looking for in a review is:
No new code has been added (beyond adding new tests and code coverage checks).