internal/uidriver/glfw/hideconsole_windows.go
func hideConsoleWindowOnWindows() {
	pid, err := getCurrentProcessId()
	if err != nil {
		// Ignore errors because:
		// 1. It is not critical if the console can't be hid.
		// 2. There is nothing to do when errors happen.
		return
	}
	w, err := getConsoleWindow()
	if err != nil {
		// Ignore errors
		return
	}
	// Get the process ID of the console's creator.
	cpid, err := getWindowThreadProcessId(w)
	if err != nil {
		// Ignore errors
		return
	}
	if pid == cpid {
		// The current process created its own console. Hide this.
		showWindowAsync(w, windows.SW_HIDE)
	}
}
func hideConsoleWindowOnWindows() {
	pid, err := getCurrentProcessId()
	if err != nil {
		// Ignore errors because:
		// 1. It is not critical if the console can't be hid.
		// 2. There is nothing to do when errors happen.
		return
	}
	w, err := getConsoleWindow()
	if err != nil {
		// Ignore errors
		return
	}
	// Get the process ID of the console's creator.
	cpid, err := getWindowThreadProcessId(w)
	if err != nil {
		// Ignore errors
		return
	}
	if pid == cpid {
		// The current process created its own console. Hide this.
		showWindowAsync(w, windows.SW_HIDE)
	}
}
// hideConsoleWindowOnWindows will hide the console window that is showing when
// compiling on Windows without specifying the '-ldflags "-Hwindowsgui"' flag.