To get started with our first nk application, there's a certain amount of setup code we need to write. Nuklear is focused on delivering a graphical toolkit API and not the operating system-specific code such as managing windows and user input. To avoid having to write all of that code ourselves, we'll use the glfw Go bindings to create and show a window for our application. The following code will set up an application window and show it (without any content). We also need to call runtime.LockOSThread() as this setup code must all execute on the main thread:
package mainimport "runtime"import "github.com/go-gl/glfw/v3.2/glfw"import "github.com/go-gl/gl/v3.2-core/gl"func init() { runtime.LockOSThread()}func main() { glfw.Init() win, ...