How to Use Static Libraries in go Language Compilation

  golang, question

When the go language is compiled, how to use the go language’s own static library, such as hello.a, I want to package the package of a go language I wrote into a static library, and then do not provide source code, so that other go programs can directly use the static library. how should I implement it and ask for help?

//suppose hello.a is in the current folder, other programs are called main.go

go tool compile -I . main.go
 go tool link -o main -L . main.o