Package goey provides a declarative, cross-platform GUI for the Go language. The range of controls, their supported properties and events, should roughly match what is available in HTML. However, properties and events may be limited to support portability. Additionally, styling of the controls will be limited, with the look of controls matching the native platform.
The package can be installed from the command line using the go tool. However, depending on your OS, please check for special instructions below.
go get bitbucket.org/rj/goey
No special instructions are required to build this package on windows. CGO is not used.
Although this package does not use CGO, some of its dependencies do. The build
machine also requires that GTK+ 3 is installed. This should be installed before
issuing go get
or you will have error messages during the building of some
of the dependencies.
On Ubuntu:
sudo apt-get install libgtk-3-dev
There is a in-progress port for Cocoa. It is currently being developped using GNUstep on Linux, but has been developped based on documentation from Apple. All controls, except for the date control (which is not available in GNUstep), are implemented. However, additional testing, especially on Darwin, is still required.
- Package documentation and examples are on godoc.
- The minimal GUI example application is onebutton, and additional example applications are in the example folder.
- A mock widget is provided in the
mock
package (documentation).
To get properly themed controls, a manifest is required. Please look at the
source code for the example applications for an example. The manifest needs to
be compiled with github.com/akavel/rsrc
to create a .syso that will be
recognize by the go build program. Additionally, you could use build flags
(-ldflags="-H windowsgui"
) to change the type of application built.
Windows | Linux (GTK) |
---|---|
Feedback and PRs welcome.
In particular, if anyone has the expertise to provide a port for MacOS, that would provide support for all major desktop operating systems.
BSD © Robert Johnstone