Concept Flow - What is Go
Start
Write Go code
Use 'go run' or 'go build'
Compiler checks code
If no errors, create executable
Run executable
See program output
End
This flow shows how Go code is written, compiled, and run to produce output.
package main import "fmt" func main() { fmt.Println("Hello, Go!") }
| Step | Action | Evaluation | Result |
|---|---|---|---|
| 1 | Start program execution | N/A | Program begins |
| 2 | Call main function | N/A | Enter main |
| 3 | Execute fmt.Println | Print string | Output: Hello, Go! |
| 4 | End main function | N/A | Program ends |
| Variable | Start | After Step 2 | After Step 3 | Final |
|---|---|---|---|---|
| N/A | N/A | N/A | N/A | N/A |
Go is a simple, fast programming language. Start with 'package main' for executable programs. Use 'func main()' as entry point. Use 'fmt.Println' to print text. Compile with 'go build' or run with 'go run'.