如何访问用Golang编写的OS X沙箱应用程序的资源文件?

I packaged a Golang application into a OSX pkg file:

productbuild --component foo.app /Applications --sign "test" foo.pkg

I can install the pkg file successfully, but can NOT launch it.

Because it can NOT read any files in the /Application/foo.app/Content/Resources.

I know that the app is running in a sandbox, and it can only read/write ~/Library/Containers/foo folder.

Basically, there are two ways may let access files int resources folder:

  1. Is there any APIs(Golang) available to visite files in ~/Library/Containers/foo?

  2. Can I make /Application/foo.app/Content/Resources be installed to ~/Library/Containers/foo? If so, how to package the app?