Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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:
      1. At the very top we have a "package ..." declaration.
      2. Then we'll import other packages we need.
      3. Then we'll declare functions.

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:

    1. Go to https://github.com/StephenGrider/GoCasts/tree/master/diagrams

    2. Open the folder containing the set of diagrams you want to edit

    3. Click on the ‘.xml’ file

    4. Click the ‘raw’ button

    5. Copy the URL

    6. Go to https://www.draw.io/

    7. On the ‘Save Diagrams To…’ window click ‘Decide later’ at the bottom

    8. Click ‘File’ -> ‘Import From’ -> ‘URL’

    9. Paste the link to the XML file

Section 3: Deeper Into Go

...