GO

lesson from

https://www.youtube.com/watch?v=yyUHQIec83I

WHy Go

    1. Go was designed to run on multiple cores and built to support concurrency
    1. Concurrency in Go is cheap and easy.
    1. Use Cases:
    • writing applications that need to be performant
    • running applications on scaled distrubited Cloud systems.

Characteristic of Go

  • For there was a need for simple and readable syntax of a dynamically typed langauge like Python.

  • Speed and Safety of a lower-level, statically typed langauge like C++.

  • Go is used for server-side/Backend Language

    • Micro Services
    • Web Applications
    • Database Services
    • CLI
    • Devops
  • Simple Syntax: Easy to learn, read, and maintain.

  • Fast build time, start up and run.

  • Requires fewer resources to run.

  • Go is a Compiled Langauge: Compiles into sing binary (Machine Codes)

    • can run on all Operating Software consistantly

Lessons

  1. Hello World
  1. Minimum Project Structure
  2. How to run a Go Program
  1. Booking App
  1. Variable
    - variables are used to store values
    - Like containers for values
    - Give the variable a name & refercence everywhere in the app.
    - 1. Benefits
      - update the value once
      - makes application more flexible

  2.Formatting Output
    - printf

  3. Data Types
    - In any programming langauge you have multiple datatypes
    - Difference: which data types do they support s exactly?
      - string
      - integers
      - booleans
      - Maps
      - Arrays
    - Each data type scan do differnt things and behaves differently.

  4. Getting User Input
    - Pointer
      1. What is a pointer?
        - A pointer is a variable that points to the memory address of another variable.

  5. Array and Slices
    - Array and slices are Data structures to store a collection of element s in a sing variable.

    1. Arrays
      - fixed in size
    2. Slices
      - Slice is an abstraction of an array.
      - slices are more flexible.
      - slices can be resized

  6. Loops
    - loops allow code to execute multiple times.

  7. Blank Identifier
    - ignore variabe not in use
    - explit with unused variables

  8. If, Else Statement & Boolean

  9. Conditionals
    - Expression that evaluate to either tru or false