Bundling assets
Go applications are designed to run from a single binary file. This means they can easily be distributed and do not rely on installation scripts. Unfortunately, this benefit results in a cost for developers—we cannot rely on resources being found along with our applications in the way that web or mobile app developers can (and as we have been doing during development). To ensure that our applications conform to this design, we must embed any required assets into the application binary. This includes fonts, images, and any other static content that is needed for the application to operate correctly.
The Fyne toolkit provides a tool for the bundling of assets that is recommended for any apps built using Fyne. The benefit of using this tool is that it generates fyne.Resource
definitions for each embedded resource, which makes it easy to pass embedded assets into various Fyne APIs. This bundle tool is actually a command within the project's fyne
command...