Communicating with the GUI

To populate the user interface, we need to define a data model and load some test data. Within the code for this book, there is a client package that contains a data model and some test data to simulate an email server. We will use that package by importing it into the Go files for this project using the package. We won't cover the details of the package in this chapter, but we will reference its defined client.EmailServer and client.EmailMessage types. The email message definition is as follows—the field names will be useful when loading email details in the UI:

type EmailMessage struct {   Subject, Content string   To, From         Email Date time.Time ...

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.