When using the out variable declaration, the declared variable "leaks" into the outer scope of the if statement. This allows you to use the variable afterwards
import (
"fmt"
"image"
"image/color"
"log"
"time"
"golang.org/x/mobile/event/lifecycle"
"golang.org/x/mobile/event/mouse"
"golang.org/x/mobile/event/key"
"golang.org/x/mobile/event/size"
"golang.org/x/exp/shiny/driver"
"golang.org/x/exp/shiny/screen"
)
var (
// set up some global helper var's
winWidth, winHeight = 800, 650
// We can get info from the event.Size() function along with other
// helpful functions and data.
sizeEvent size.Event
)