Skip to content

x/tools/cmd/goimports: unnecessary rename of imports #29556

Closed
@rsc

Description

@rsc

In GOPATH mode:

$ go get gopkg.in/russross/blackfriday.v2
$ echo 'package p; import "gopkg.in/russross/blackfriday.v2"; var _ blackfriday.Node' | goimports
package p

import blackfriday "gopkg.in/russross/blackfriday.v2"

var _ blackfriday.Node
$ 

Why did goimports rename this import? It should not be doing that. The package clause in the package already says blackfriday, and furthermore the package name follows the standard import path rules for package names on gopkg.in.

/cc @heschik @bradfitz

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions