The implementation of the local storage inspector can be found in the localstorage.go source file in the client/localstoragedemo directory. In the import groupings we include the js and dom packages (shown in bold):
package localstoragedemoimport ( "github.com/gopherjs/gopherjs/js" "honnef.co/go/js/dom")
We've defined the localStorage variable and we've assigned it the value of the localStorage object that is attached to the window object:
var localStorage = js.Global.Get("localStorage")
As usual, we've aliased the Document object with the D variable to save us some typing:
var D = dom.GetWindow().Document().(dom.HTMLDocument)
The InitializePage function is responsible for setting up the event listeners ...