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

go.tools/imports: fails to parse valid Go code #6983

Closed
dgryski opened this issue Dec 18, 2013 · 2 comments
Closed

go.tools/imports: fails to parse valid Go code #6983

dgryski opened this issue Dec 18, 2013 · 2 comments

Comments

@dgryski
Copy link
Contributor

dgryski commented Dec 18, 2013

(Sorry I haven't managed to trim down the test case.  In doing so, I kept running into
the formatting problem I just reported with strange comment movements.)


What steps will reproduce the problem?
1. git clone github.com/dgryski/dkrcrypt  
2. edit aria.go, add "var _ cipher.Block = &AriaCipher{}" at the bottom
3. goimports

What is the expected output?
The crypto/cipher import is added.

What do you see instead?
I get a warning added to the top of my fail (which then fails to compile -- this may be
vim integration problems).
2013/12/18 10:16:12 addImportViaSourceModification error: 194:3: expected 1 expression
and the crypto/cipher import is added oddly split across a comment:

import
  
// The ARIA Block cipher from KISA
// Copyright (c) 2012 Damian Gryski <damian@gryski.com>
// Licensed under the GPLv3 or, at your option, any later version.
"crypto/cipher"
@adg
Copy link
Contributor

adg commented Dec 18, 2013

Comment 1:

Labels changed: added repo-tools.

Status changed to Accepted.

@bradfitz
Copy link
Contributor

bradfitz commented Feb 8, 2014

Comment 2:

Pretty sure this is the same as issue #7107,  which has a smaller summary and examples.

Status changed to Duplicate.

Merged into issue #7107.

This issue was closed.
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

4 participants