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

Use of internal package #5

Open
pinpox opened this issue Nov 24, 2016 · 1 comment
Open

Use of internal package #5

pinpox opened this issue Nov 24, 2016 · 1 comment
Labels

Comments

@pinpox
Copy link
Contributor

pinpox commented Nov 24, 2016

Hi,
this is just for discussion, not a real bug or issue.

Is the use of a "internal" package needed/useful? I find it unnecessarily complicated to contribute, for every change I have to fork, pull fork, change package import path to my user, make changes, change package import back, push. Otherwise I get an error when trying to run the tests:

binaryplease➜github.com/binaryplease/numgo(master)» go test .                                                                                                                                            
package github.com/binaryplease/numgo
	imports github.com/Kunde21/numgo/internal: use of internal package not allowed

This might be a stupid mistake as I'm pretty new to go. Is there a common workaround for this rather than changing the import path in the code forth and back all the time? I must admit I don't really understand the code in that folder very well though.

@Kunde21
Copy link
Owner

Kunde21 commented Nov 24, 2016

The internal package is more for organization and cleanliness than functionality. It's all of the assembly code for vector operations specific to numgo. Since assembly isn't very user-friendly, I thought it best to keep it separate. I need to go through and put each asm function in its own file, as well.

For development, it's much easier to add your fork's remote to the original clone than juggle different copies:

go get github.com/Kunde21/numgo
cd $GOPATH/src/github.com/Kunde21/numgo
git remote add <RemoteName> git@github.com:binaryplease/numgo

Then, the only change to your workflow is specifying the remote in push/pull commands.

git branch <BranchName>
edit/compile/test
git push <RemoteName>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants