Now, let’s update the application interface to display the two new widgets.

Updating the summaryWidgets.go file

Let’s update the file called summaryWidgets.go to define the new widgets. We add the package definition and import list.

We’ll use:

  • The context package to define a cancellation context to close the widgets.
  • The math package to use some mathematical functions.
  • The time package to deal with times and dates.
  • The cell, widgets/barchart, and widgets/linechart packages to create the required widgets.
  • Our pomodoro package to access the repository.

Get hands-on with 1200+ tech skills courses.