"DH_GOPKG"
"DH_GOPKG" (string) contains the Go package name which this Debian package is building.
"DH_GOPKG" is automatically set to the value of the first import path of the "XS-Go-Import-Path" "debian/control" field, which can contain several comma-separated import paths.
Example (in "debian/control"):
XS-Go-Import-Path: github.com/go-mgo/mgo,gopkg.in/mgo.v2,labix.org/v2/mgo,launchpad.net/mgo
"DH_GOPKG" is set by dh-golang, and as a consequence it is not present in the "debian/rules" environment. If you need to use the Go package name in the "debian/rules" file, you must define it yourself.
Example (in "debian/rules"):
export DH_GOPKG := github.com/go-mgo/mgo
Historical note: before the "XS-Go-Import-Path" field was introduced, we used to set "DH_GOPKG" in "debian/rules". When you encounter such a package, please convert it by moving the value from "debian/rules" to "debian/control". It is preferable to use the "debian/control" field because it is machine-readable and picked up/used by various Debian infrastructure tools, whereas "debian/rules" is very hard to parse.