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 3, Go 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 windows
package main
...
We then introduce a new file that will handle the fallback case when we're on a different platform. For this simple project we will call it nonwindows.go ...