Skip to content

reflect: PkgPath returns un-importable path #12019

@rgarcia

Description

@rgarcia

What version of Go are you using (go version)?

go version go1.5beta3 linux/amd64

What operating system and processor architecture are you using?

Ubuntu Precise 64 bit

What did you do?

I ran PkgPath on a reflect.Type in a vendored package: https://gist.github.com/rgarcia/f0c6507fbd1327d59bcf

(larger context: trying to solve golang/mock#4)

What did you expect to see?

A path string that does not include the "vendor" component.

What did you see instead?

A path string that includes "vendor" (and thus cannot be used as an actual import due to "must be imported as..." compiler error).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions