无法在IntelliJ IDEA中创建.go文件

I'm using Intellij IDEA Community 2016.3 with the golang plugin.

Recently within Intellij I created a new package then I tried to create a new go file in that package. Intellij gave me a template error message, something like this:

Unable to parse template "Class" Error message: This template did not produce a Java class or an interface - during New -> Java Class

(To create the file I right-clicked the package and selected New > Go File.) I then went into the file system and manually created the file. After a brief pause, Intellij closed the pane on the left that lists all my packages. Intellij also corrupted the project such that I was not able to view the project pane again.

I recreated the project and everything seems to be fine now but I don't want to have to do all that again each time I create a .go file.

I don't know if this makes a difference, but the package I tried creating the file in is a download from github. Intellij has been telling me this:

The directory C:\go-workspace\src\gopl.io is under Git, but is not registered in the Settings. 

It's someone else's project -- files for learning go-- and I don't plan on sending any pull requests. I simply created the package and file there because they are part of learning go.

How do I create .go files in Intellij?

Added 21-Jan:

Here are my project settings: enter image description here

Make sure you got the Go setup properly before continuing.

Next I'd also make sure the plugin setup is good(maybe reinstall after making sure your go setup is ok), such as the project SDK is set to something Go and not Java as that's usually the default(see image below) and IntelliJ can detect your GOPATH.

enter image description here

If the project your'e working on was not an IntelliJ module before and you just opened it, make sure the .iml file is a Golang module (IntelliJ usually asks you to do this automatically if it's not already done, but you need to setup the project SDK to Go first I assume)

ie.(my hello.iml);

<?xml version="1.0" encoding="UTF-8"?>
<module type="GO_MODULE" version="4">
  <component name="NewModuleRootManager" inherit-compiler-output="true">
    <exclude-output />
    <content url="file://$MODULE_DIR$" />
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
    <orderEntry type="library" name="GOPATH &lt;hello&gt;" level="project" />
  </component>
</module>

Here is a comprehensive step by step guide for a starter setup; https://rootpd.com/2016/02/04/setting-up-intellij-idea-for-your-first-golang-project/