The Compilation Process
Go Program Structure
We'll go over this all later in more detail, but to sate your curiosity:
1
2
import "fmt"
import "fmt" imports the fmt (formatting) package from the standard library. It allows us to use fmt.Println to print to the console.
Two Kinds of Errors
Generally speaking, there are two kinds of errors in programming:
Compilation errors. Occur when code is compiled. It's generally better to have compilation errors because they'll never accidentally make it into production. You can't ship a program with a compiler error because the resulting executable won't even be created.
Runtime errors. Occur when a program is running. These are generally worse because they can cause your program to crash or behave unexpectedly.
Last updated