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

modules: reuse code between different versions #39548

Closed
GrigoriyMikhalkin opened this issue Jun 12, 2020 · 1 comment
Closed

modules: reuse code between different versions #39548

GrigoriyMikhalkin opened this issue Jun 12, 2020 · 1 comment

Comments

@GrigoriyMikhalkin
Copy link
Contributor

@GrigoriyMikhalkin GrigoriyMikhalkin commented Jun 12, 2020

I working on this package which has several versions. Versions code located in vN packages, and pretty much identical, except for one dependency, which should have different versions. So there's common code for PaginateParams and PaginateParamsParser between this versions.

My question is, what is best way to reuse this code between different versions? Looks like, if this code is located somewhere else in root module, then root module will be considered as dependency and will be present in go.mod. Is there way to avoid that, or should i just replicate code for each version?

@toothrot
Copy link
Contributor

@toothrot toothrot commented Jun 12, 2020

For asking questions about learning the language, see one of our forums: https://golang.org/wiki/Questions. We only use this issue tracker for tracking bugs. People in the forums can explain what is happening here.

@toothrot toothrot closed this Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.