---
name: "dh_golang"
section: "1p"
platform: "linux"
package: "dh-golang"
version: "1.63"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dh_golang"
---

# dh\_golang(1p)

Generates Static-Built-Using substvar for Go programs

## NAME

dh\_golang - Generates Static-Built-Using substvar for Go programs

## SYNOPSIS

**dh\_golang** \[*debhelper options*\]

## DESCRIPTION

**dh\_golang** is a debhelper program which adds the misc:Static-Built-Using substvar based on the dependencies of the package being built. It uses go list to determine the packages imported and dpkg-query to find the source package and version that provided that package.

**dh\_golang** started out in 2013 by generating the misc:Built-Using substvar, but it was clarified Debian Policy in 2017 that the Built-Using field was intended only for license-required dependencies, hence the switch to the new Static-Built-Using field in 2022.

For backward compatibility, **dh\_golang** will continue to generate the misc:Built-Using substvar until all Go packages have transitioned to misc:Static-Built-Using.

## NOTES

The best way to invoke **dh\_golang** is by adding **dh-sequence-golang** to the package build dependencies and using **dh** or by using **dh --with=golang**.

## SEE ALSO

[**Debian::Debhelper::Buildsystem::golang**(3pm)](/Debian::Debhelper::Buildsystem::golang/3pm.md), [**dh-make-golang**(1)](/dh-make-golang/1.md), [**dh**(1)](/dh/1.md), [**deb-control**(5)](/deb-control/5.md)

## AUTHORS

- Michael Stapelberg \<stapelberg@debian.org\>

  - Debian Go Packaging Team \<team+pkg-go@tracker.debian.org\>
