Trabla: GO & intellijidea 2016: run GO project in intellij idea
Solving:
1. Create Go lang project - detailed tutorial here:
https://codingtrabla.blogspot.com/2016/03/go-intellijidea-2016-create-go-project.html
2. Let's create hello world code and Run it - delete all from file "HelloWorld.go" and put following code
package main import "fmt" func main() { fmt.Printf("Hello, world.\n") }
In menu click "Run" -> "Run"
4. In "Run" dialog click "Edit configurations..."
5. Click "+" button to add new configuration
6. In "Add New Configuration" dialog - click "Go Application"
7. Type run config name,
type file name in project folder with package "main" and fn "main" ( entry point ),
click "Apply" button,
click "Run" button
8. Hooray :)
No comments:
Post a Comment