"
Subdirectories
If you want to download only a specific subdirectory from a downloaded directory, you can specify a subdirectory after a double-slash //. go-getter will first download the URL specified before the double-slash (as if you didn't specify a double-slash), but will then copy the path after the double slash into the target directory.
For example, if you're downloading this GitHub repository, but you only want to download the testdata directory, you can do the following:
go install github.com/hashicorp/go-getter/cmd/go-getter@v1.7.1
# this works ... even though it says it fails
go-getter github.com/hashicorp/go-getter.git//testdata $(PWD)/testdata
# this fails ... even though it says success.
go-getter https://github.com/hashicorp/go-getter.git//testdata $(PWD)/testdata
2023/06/13 16:57:00 success!
https://pkg.go.dev/github.com/hashicorp/go-getter@v1.7.1#section-readme
" Subdirectories If you want to download only a specific subdirectory from a downloaded directory, you can specify a subdirectory after a double-slash //. go-getter will first download the URL specified before the double-slash (as if you didn't specify a double-slash), but will then copy the path after the double slash into the target directory.
For example, if you're downloading this GitHub repository, but you only want to download the testdata directory, you can do the following:
https://github.com/hashicorp/go-getter.git//testdata"
Please check it yourself