- When defining variables, functions etc, upper case first letter means they are accessible to external namespaces, libraries etc.
- Go also has a 'main' function (application starts here).
- GO executes applications in the following order:
- 1. Imports statements
- 2. Package-level variables/constants declarations
- 3. init() function
- 4. main() function (if the project is to be treated as an app)
-
- Example of a namespace declaration = 'package main'.
-
- Prepending '&' symbol allows us to get the memory address (reference) of almost anything.
- When we do this we are working with the original data, not a copy of it.
-
-
# |
Change |
User |
Description |
Committed |
|
#1
|
26196 |
Jen Bottom |
Copying up cmd line app tutorial work from dev to main |
5 years ago
|
|