Course outline
Course / The terminal and the language

Print your first line

Lab

How to fetch and submit this lab

Once: install the tool and connect your account.

curl -fsSL https://gonomicon.com/install.sh | sh
gonomicon login

Each lab: download it, edit the file named in the instructions, then submit.

gonomicon fetch week-1/07-01-hello-world-printed
cd 07-01-hello-world-printed
gonomicon submit

Go installed? gonomicon test runs the visible test on your computer first. Submitting also runs hidden checks on our server.

Goal

Write a program that prints exactly one line:

Hello from my first Go program!

What "exactly" means

The test builds your program into a real executable and runs it, then checks the output character for character. That means:

  • No extra spaces before or after the text.
  • No extra blank lines.
  • The capitalization and the exclamation point matter.

Where to write it

Edit main.go. You already have package main and an empty func main() — fill it in with one line that prints the message.

Checking your work

go run .

Read what prints, then run the test:

go test ./...

Run it

gonomicon fetch week-1/07-01-hello-world-printed
cd 07-01-hello-world-printed
gonomicon test
gonomicon submit

Hints

  1. fmt.Println adds the newline for you automatically — don't add your own.
  2. The exact text matters: capitalization and punctuation included.

Something wrong with this lesson? Report a problem