Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8374049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:50:08+00:00 2026-06-09T14:50:08+00:00

Just trying out Go, but I can’t get it to compile my very first

  • 0

Just trying out Go, but I can’t get it to compile my very first program. This caused a bunch of questions on the compiler.

It is contained in this single file:

"D:\programming\Go\src\mytest\mytest.go"

the program text is:

// mytest project mytest.go
package mytest

import "fmt"

func main() {
    fmt.Println("Hello, Go!")
}

In the package folder I tried the following commands:

>go build

says nothing. According to go help build this is the intended result.

>go build -v
_/D_/programming/Go/src/mytest

What are the _/D_/ things are??? Looks like a new invention!

And the most strange one:

>go build -v mytest
can't load package: package mytest: import "mytest": cannot find package

So what am I doing wrong and how do I get the thing compiled?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:50:09+00:00Added an answer on June 9, 2026 at 2:50 pm

    The main function in a program must be in package main. Package main can then import other packages and call them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working very long on trying to straighten this out, but I just
I'm trying to execute a SQL command, but I just can't find out why
Just trying to get some rows out of a database and loop through but
i just started learning swings. And thought of trying out a simple program, but
I'm trying out the Graph Api and FQL from Facebook, but i can't get
Hopefully I can get my point across. I am just trying to figure out
I am just trying out ASP.NET MVC 4 but I can't figure out how
This should be simple, but I'm shredding my hair just trying to think how
I'm just trying to figure out how I can sort a directory listing according
We've just started trying out gStreamer-Sharp, to see if we can create pipelines, with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.