cmd/gomobile: propagate output file close errors buildSrcJar, writeFile, and goAndroidBuild attempt to propagate output file close errors by assigning them to local err variables from deferred functions. Since these functions have unnamed return values, those assignments do not affect the returned errors. Name the error results and close output files in deferred functions, using errors.Join to preserve both operation and close errors when both occur. Apply the same handling to existing output cleanup in buildAAR and doCopyAll. Change-Id: Ie44275fdc3841dee09306e828a49c153276d4c75 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/807941 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Mark Freeman <markfreeman@google.com> Auto-Submit: Hajime Hoshi <hajimehoshi@gmail.com> Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
The Go mobile repository holds packages and build tools for using Go on mobile platforms.
Package documentation as a starting point:
The Go Mobile project is experimental. Use this at your own risk. While we are working hard to improve it, neither Google nor the Go team can provide end-user support.
This is early work and installing the build system requires Go 1.5. Follow the instructions on golang.org/wiki/Mobile to install the gomobile command, build the basic and the bind example apps.
Contributions to Go are appreciated. See https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/mobile.