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

import: fix adding import to empty imports #1938

Merged
merged 2 commits into from
Sep 2, 2018
Merged

import: fix adding import to empty imports #1938

merged 2 commits into from
Sep 2, 2018

Conversation

fatih
Copy link
Owner

@fatih fatih commented Sep 2, 2018

fixes #1534

let linesdelta -= 1
let indentstr = 1
else
call append(appendline, appendstr)
Copy link
Collaborator

@bhcleek bhcleek Sep 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The appendline == packageline block needs to call append(appendline, appendstr) now, too.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch, fixed it.

@bhcleek
Copy link
Collaborator

bhcleek commented Sep 2, 2018

Lgtm

@fatih fatih merged commit 187fd63 into master Sep 2, 2018
@fatih fatih deleted the fix-import branch September 2, 2018 19:29
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.

GoImport broken when adding to empty imports.
2 participants