Walk in a cross-platform application

Walk is clearly a library aimed at creating graphical user interfaces for the Microsoft Windows platform—but this doesn't mean that building your application with Walk limits you to Windows only. Using the techniques explored in Chapter 3Go to the Rescue!, we can set the code for Windows to be conditionally included when building for the platform, and introduce other files that could provide a user interface for other platforms.

The first step is to update the files we have built so far to only build on Windows. We do this using the build constraints comment format (you could also use file naming for this step if you wish):

// +build windowspackage main...

We then introduce a new file that will handle ...

Get Hands-On GUI Application Development in Go now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.