// pkgConfig runs pkg-config with the specified arguments and returns the flags it prints. func pkgConfig(mode string, pkgs []string) (flags []string, err error) { … } // pkgConfigFlags calls pkg-config if needed and returns the cflags // needed to build the package. func pkgConfigFlags(p *build.Package) (cflags []string, err error) { … }