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

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

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.

@golang golang locked and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants