
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.

Install
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
Windows
No special instructions are required to build this package on windows. CGO is not used.
Linux
This package requires the use of CGO to access GTK, which must be installed. The GTK libraries should be installed before issuing go get
or you will have error messages during the building of some of the internal packages.
On Ubuntu:
sudo apt-get install libgtk-3-dev
Linux with GNUstep
This package can be built to target Cocoa using GNUstep, which must be installed. Most users are unlikely to want to use this option, but it can be useful for development. The libraries for GNUstep must be installed before issuing go get
or you will have error message during the building of some of the internal packages.
On Ubuntu:
sudo apt-get install gnustep-devel
To force the use of GNUstep, build using the build tag cocoa
.
BSD
This package requires the use of CGO to access GTK, which must be installed. The GTK libraries should be installed before issuing go get
or you will have error messages during the building of some of the internal packages.
MacOS
There is a in-progress port for Cocoa. It is currently being developed using GNUstep on Linux, but has been developed 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.
If you can either test on Macs, or provide build systems, please contact us.
Getting Started
Package documentation and examples are on godoc.
The minimal GUI example application is onebutton, and additional example applications are in the example folder. Some of the example show the options available for the widgets, for example align and paragraph.
New layout widgets can be developed entirely in Go. For testing, a mock widget is provided in the mock
package.
Windows
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.
Screenshots
Windows | Linux (GTK) | MacOS (Cocoa) |
---|
 |  |  |
 |  |  |
 |  |  |
 |  |  |
 |  |  |
 |  |  |
 |  |  |
 |  |  |
Contribute
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.

Related Projects
- fyne: Cross platform GUI in Go based on Material Design.
- gio: Gio implements portable immediate mode GUI programs in Go.
- gotk3: Go bindings for GTK3.
- nuklear: This project provides Go bindings for nuklear.h -- a small ANSI C GUI library.
- walk: A Windows GUI toolkit for the Go Programming Language.
- ui: Platform-native GUI library for Go.
License
BSD (c) Robert Johnstone