enable with an include and use the helper go-build-info to run go build and go install commands to inject the builds environment
package main
import (
"fmt"
"os"
"github.com/davidwalter0/go-build"
)
func init() {
fmt.Fprintf(os.Stderr, "\nBuildinfo for %s\n\n", os.Args[0])
build.BuildInfo()
}
func main() {
}
cd cmd/example
go-build-info go build
cd cmd/example
ls -l
./build-info-example 2>&1