I don't know syntax of Go. Can anybody help me to convert following java code in google's go language .
import java.io.*;
class FileWrite
{
public static void main(String args[])
{
try {
// Create file
FileWriter fstream = new FileWriter("out.txt");
BufferedWriter out = new BufferedWriter(fstream);
out.write("Hello Java");
// Close the output stream
out.close();
} catch (Exception e){ //Catch exception if any
System.err.println("Error: " + e.getMessage());
}
}
}
This java code creates a file named out.txt and write a string (Hello Java) on the file.