I started gogland. I have a running problem.
1 Answers
The error message says that you much pick a file in order for the configuration to work. Specifically it must be a file containing the func main()
declaration.
You can use the Run Type: Package instead of file in order to run a package.
For example, if your main is under $GOPATH/src/github.com/dlsniper/demo/cmd/mycmd/main.go
then you need to use github.com/dlsniper/demo/cmd/mycmd
in order to run it.
Moreover, from the screenshot you've pasted, it seems like you are not under a valid Go workspace. Please see here what a Go Workspace is and how to create one: https://golang.org/doc/code.html#Workspaces
Finally, if you prefer a visual guide for this, please have a look at this video on how to create and use Run Configurations in Gogland: https://www.youtube.com/watch?v=ko-wKntCLjg

- 7,188
- 1
- 35
- 44
-
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/17369048) – Nick Weaver Sep 18 '17 at 15:46
-
@NickWeaver thank you, I've edited my response based on your feedback. Please let me know if I can make it any better. Thank you. – dlsniper Sep 18 '17 at 16:25