

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Packages
incomplete
2: Package Naming
incomplete
3: Install
incomplete
4: Modules
incomplete
5: Go Environment
incomplete
6: First Local Program
incomplete
7: Go Run
incomplete
8: Go Build
incomplete
9: Go Install
incomplete
10: Custom Package
incomplete
11: Custom Package Continued
incomplete
12: Remote Packages
incomplete
13: Clean Packages
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
The go run command quickly compiles and runs a Go package. The compiled binary is not saved in your working directory.
I typically use go run to do local testing, scripting and debugging.
Conventionally, the file in the main package that contains the main() function is called main.go.
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
go run main.go
Run and submit the CLI tests from the root of the main package.
You can execute go help run in your shell to rtfm.