...
- So, what's that 'func' thing?
- 'func' is short for "function". Functions in Go work just like functions in other languages.
- How is the
main.go
file file organized?- A: It's always the same pattern in every file:
- At the very top we have a "package ..." declaration.
- Then we'll import other packages we need.
- Then we'll declare functions.
- A: It's always the same pattern in every file:
Quiz 1
- What is the purpose of a package in Go?
- What is the special name we use for a package to tell Go that we want it to be turned into a file that can be executed?
- The one requirement of packages named "main" is that we...
- Why do we use "import" statements?
...
- No video, just text.
How to use the course diagrams:
Go to https://github.com/StephenGrider/GoCasts/tree/master/diagrams
Open the folder containing the set of diagrams you want to edit
Click on the ‘.xml’ file
Click the ‘raw’ button
Copy the URL
Go to https://www.draw.io/
On the ‘Save Diagrams To…’ window click ‘Decide later’ at the bottom
Click ‘File’ -> ‘Import From’ -> ‘URL’
Paste the link to the XML file
Section 3: Deeper Into Go
...