golang - Codecademy Course
golang - Codecademy Course

Bibliography
- Author: Terms of Service
- Full_Title: golang - Codecademy Course
- Category: articles
- URL: https://www.codecademy.com/courses/learn-go/lessons/learn-go-introduction/exercises/basic-go-structure-packages
- Last Highlighted Date: 2023-02-03 02:35:09.540734+00:00
Highlights
- Package Declaration
Let’s focus on the first line package main. This line is called a package declaration and it tells the Go compiler to which package this ‘.go’ file belongs. If this package declaration is ‘package main’, then this program will be compiled into an executable.
- Open in Readwise ^rw468517641
- Import Statement
Then we have an import statement, import “fmt”. The import keyword allows us to use code from other packages, in this case the Println function from the fmt package. Note how the package name is enclosed with double quotes “.
- Open in Readwise ^rw468519396
Tags: