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.
-
4Goland is a Go IDE and there is no reason to expect it to support Java since the languages are completely unrelated. Use a Java IDE to write Java code.– PeterDec 10, 2020 at 7:02
-
You also won't be able to reference any Java code from your Go code or vice-versa, so the value of actually creating a Java class to test Go code is likely zero.– AdrianDec 10, 2020 at 14:21
1 Answer
To create a Java file in GoLand, you need to invoke File | New | File and enter the whole name with an extension, e.g., MyFactoryBean.java. But keep in mind that GoLand doesn't offer Java support, so you won't get syntax highlighting, code completion, and so on. IntelliJ IDEA Ultimate, on the contrary, supports both Java and Go at the same time, so you might want to use it to work with both languages simultaneously.