About the Getting Help category

Get help with your Go code and give similar help to others. (post+getting-help@golangbridge.org)

When asking a question:

  • Clearly explain what you’re trying to do
  • State the problem and report exact error messages or program behavior
  • Post your code
  • Explain what you’ve already tried
  • Ask your question

Please do not ask us to write your code for you, although we’re happy to help you troubleshoot and debug.

Pro Tip: If somebody has answered your question sufficiently, please mark the reply as the accepted answer so others can find it easily.

Another Pro Tip: Use proper formatting, especially with code. 3 backticks (`) for a block, 1 for inline code. American keyboards have this up by the tilde (~) key.

As always, be kind and respect other people’s time and efforts. This is a great opportunity for us to learn and gain experience, so enjoy it!

Posting by email

You can post topics to this category by emailing post+getting-help@golangbridge.org

2 Likes

I’m trying to write my first “hello world” and getting my feet into the Go World

Now the problem it’s giving all kinds of error

This is my path
C:\User\ABC\go\src\github.com\aagit\goerapp\main.go

The Code;

package main

import “fmt”

func main() {
Println (“Hello Go World”)
}

Then I run the go run main.go command

This is what it returned on the terminal;
The system cannot find the file specified

And below are the five problem attached with it

*Could not import fmt (cannot find package “fmt” in any of compiler BrokenImport) [Ln, Col 9]

C:\Prog Files\Go\Src\fmt\fmt (from $GOROOT)

C:\User\ABC\go\src\fmt (from $GOPATH)

  • “fmt” imported but not used compiler (UnusedImport) [Ln 3, Col 9]

  • main redeclared in this block compiler" (DuplicateDecl) [Ln 5, Col 6]
    main.go [Ln 5, Col 6]: other declaration of main

  • main redeclared in this block (see details) compiler (DuplicateDecl) [Ln 5, Col 6]
    main.go [Ln 5, Col 6]: main redeclared in this block [Ln 5, Col 6]: other declaration of main (this error)

  • undeclared name: Println compiler (UndeclaredName) [Ln 6, Col 1]