The Golang Build Sublime Text package is structured as follows:
As is dictated by the Sublime Text API, the following list shows a mapping of command to Python class name:
golang_build: GolangBuildCommand()golang_build_get: GolangBuildGetCommand()golang_build_cancel: GolangBuildCancelCommand()golang_build_reopen: GolangBuildReopenCommand()golang_build_terminal: GolangBuildTerminalCommand()For golang_build and golang_build_get, the commands display output to the user via an output panel. Normally with Sublime Text when a reference to the sublime.View object for an output panel is requested, any existing content is erased. To prevent a jarring experience for users when a build is interrupted, a reference to each window's Golang Build output panel is held in memory and re-used when a user interrupts a running build with a new invocation.
The GolangProcess() class reprents an invocation of the go executable, and provides a queue of output information. This output queue is processed by a GolangProcessPrinter() object which adds environment information before the output starts, and summary information once completed. There is one GolangPanel() object per Sublime Text window, and it contains a lock to ensure that only one GolangProcessPrinter() may be displaying output at a time to prevent interleaved output.