If blobstore.BlobInfo
is a type then declare a variable of that type in another package like:
var blob blobstore.BlobInfo
The syntax
var foo = bar.Qux
attempts to create var foo
and initialize it by assigning it the value of bar.Qux
while inferring bar.Qux
's type.
EDIT:
To declare a variable of type T
var v T
T can come from other package. For example
import "foo/bar"
import baz "qux"
import . "whatever"
var v1 bar.T
var v2 baz.T
var v3 T // whatever.T
If this doesn't work for you then some of the possible problems are:
- Package
blobstore
is not instaled.
- Package
blobstore
is not found in your GOPATH using the import path shown in the OP.