Skip to content

Tag: go

Why do both Java and Go lock socket before write?

The Go internal/poll/fd_unix.go code is here the java code java.net.SocketOutputStream#socketWrite is here I don’t know why we need to lock that. Another question is the syscall.Write equivalent to <unistd.h> write in C? Answer Well, only answering for the Java part: As we are already talking abou…

How shall I add Java class file?

I am using Goland IDE to build microservice in Go. If I have to write tests in Java, can Goland IDE support that. I don’t see the support for Java in Goland. But wanted to check with folks who are experienced in Goland. Answer To create a Java file in GoLand, you need to invoke File | New | File