Skip to content

Instantly share code, notes, and snippets.

@rgarcia
Created August 4, 2015 22:09
Show Gist options
  • Save rgarcia/f0c6507fbd1327d59bcf to your computer and use it in GitHub Desktop.
Save rgarcia/f0c6507fbd1327d59bcf to your computer and use it in GitHub Desktop.
PkgPath bug?
// $GOPATH/src/a/vendor/b/b.go
package b
type B struct {
}
// $GOPATH/src/a/main.go
// GO15VENDOREXPERIMENT=1 go run main.go
package main
import (
"b"
"reflect"
)
func main() {
print(reflect.TypeOf(b.B{}).PkgPath(), "\n") // outputs "a/vendor/b"; expected "b"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment