func main() { logger := spacelog.GetLogger() logger.Debug("Testing logger") go UDPServer("0.0.0.0", 9060) WebServer("0.0.0.0", 8080) // quit := make(chan struct{}) // <-quit }
import ( "errors" "fmt" "io/ioutil" "os" "runtime" "unsafe" "github.com/spacemonkeygo/spacelog" ) var ( ssl_ctx_idx = C.SSL_CTX_get_ex_new_index(0, nil, nil, nil, nil) logger = spacelog.GetLogger() ) type Ctx struct { ctx *C.SSL_CTX verify_cb VerifyCallback } //export get_ssl_ctx_idx func get_ssl_ctx_idx() C.int { return ssl_ctx_idx } func newCtx(method *C.SSL_METHOD) (*Ctx, error) { runtime.LockOSThread() defer runtime.UnlockOSThread()