Managing platform specifics

Back in Chapter 3Go to the Rescue!, we saw that the Go compiler has built-in support for the conditional inclusion of source files based on a system of environment variables and build tags. As an application adds more functionality, especially from a platform-integration perspective, it is possible that the toolkit you have chosen will not provide all of the functionality you are looking for. When this happens, the code will need to be updated to handle platform-specific functionality. To do so, we will use a variation of the conditional build  using well-named files instead of build tags (as used in Chapter 11, Navigation and Multiple Windows). This is easier to read at the project level and should indicate ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.