If you want to learn more about what is happening behind the scenes when you execute a go build command, you should add the -x flag to it:
$ go build -x defer.go WORK=/var/folders/sk/ltk8cnw50lzdtr2hxcj5sv2m0000gn/T/go-build254573394 mkdir -p $WORK/b001/ cat >$WORK/b001/importcfg.link << 'EOF' # internal packagefile command-line-arguments=/Users/mtsouk/Library/Caches/go-build/9d/9d6ca8651e083f3662adf82bb90a00837fc76f55839e65c7107bb55fcab92458-d packagefile fmt=/usr/local/Cellar/go/1.11.4/libexec/pkg/darwin_amd64/fmt.a packagefile runtime=/usr/local/Cellar/go/1.11.4/libexec/pkg/darwin_amd64/runtime.a packagefile errors=/usr/local/Cellar/go/1.11.4/libexec/pkg/darwin_amd64/errors.a packagefile io=/usr/local/Cellar/go/1.11.4/libexec/pkg/darwin_amd64/io.a packagefile math=/usr/local/Cellar/go/1.11.4/libexec/pkg/darwin_amd64/math.a packagefile...