func init() {
	C.glfwSetErrorCallbackCB()
}
Set the glfw callback internally
package glfw
import "C"
import (
	"fmt"
	"log"
)
type ErrorCode int
const (
	notInitialized   ErrorCode = C.GLFW_NOT_INITIALIZED     
	noCurrentContext ErrorCode = C.GLFW_NO_CURRENT_CONTEXT  
	invalidEnum      ErrorCode = C.GLFW_INVALID_ENUM        
	invalidValue     ErrorCode = C.GLFW_INVALID_VALUE       
	outOfMemory      ErrorCode = C.GLFW_OUT_OF_MEMORY       
	platformError    ErrorCode = C.GLFW_PLATFORM_ERROR      
)
const (
	APIUnavailable ErrorCode = C.GLFW_API_UNAVAILABLE
	VersionUnavailable ErrorCode = C.GLFW_VERSION_UNAVAILABLE
	FormatUnavailable ErrorCode = C.GLFW_FORMAT_UNAVAILABLE
)
func (e ErrorCode) String() string {
	switch e {
	case notInitialized:
		return "NotInitialized"
	case noCurrentContext:
		return "NoCurrentContext"
	case invalidEnum:
		return "InvalidEnum"
	case invalidValue:
		return "InvalidValue"
	case outOfMemory:
		return "OutOfMemory"
	case platformError:
		return "PlatformError"
	case APIUnavailable:
		return "APIUnavailable"
	case VersionUnavailable:
		return "VersionUnavailable"
	case FormatUnavailable:
		return "FormatUnavailable"
	default:
		return fmt.Sprintf("ErrorCode(%d)", e)
	}
}
type Error struct {
	Code ErrorCode
	Desc string
}
func (e *Error) Error() string {
	return fmt.Sprintf("%s: %s", e.Code.String(), e.Desc)
}
var lastError = make(chan *Error, 1)
func goErrorCB(code C.int, desc *C.char) {
	flushErrors()
	err := &Error{ErrorCode(code), C.GoString(desc)}
	select {
	case lastError <- err:
	default:
		fmt.Println("GLFW: An uncaught error has occurred:", err)
		fmt.Println("GLFW: Please report this bug in the Go package immediately.")
	}
}