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

follow import style guide. #48

Closed
wants to merge 1 commit into from
Closed

follow import style guide. #48

wants to merge 1 commit into from

Conversation

rexposadas
Copy link

@jmcvetta
Copy link
Owner

This is an interesting issue.

The current code is formatted with gofmt. Therefore it can be considered canonically "correct". The output of the goimports tool looks nice, but I'm inclined to prefer the gofmt style just because it's the standard.

That said, if there is a strong reason why we should prefer goimports style formatting over gofmt I'm open to considering it.

@rexposadas
Copy link
Author

from my understanding goimports doesn't separate the imports for you. it simply removes and adds imports when necessary.

I don't think it's one or the other. I separate the imports manually then run gofmt on my files.

But your comment got me thinking if i'm doing it the right way.

@jmcvetta
Copy link
Owner

jmcvetta commented Sep 3, 2014

For the moment I think I prefer the standard gofmt formatting of imports. The reason for this is a) it's automatic, b) it's "standard", and c) it doesn't currently cause me any problems.

So for the moment I am going to close this PR unmerged. But I remain open to discussion.

@jmcvetta jmcvetta closed this Sep 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants