1. Golang
  2. Introduction to Golang
    1. Features
    2. Why Golang?
    3. Go Designed by
    4. Open Souce
    5. Platforms
    6. Major Open Source Projects
    7. Install Golang
    8. Show Installed Version of Golang
    9. Editor/IDE for Golang
    10. Hello World
    11. Build Hello World exe
    12. Source of examples
    13. Separate directories! - main redeclared in this block
    14. Exercise: Hello World
  3. Basics
    1. Hello Foo - Println
    2. Hello Bar - Printf
    3. Hello Bar - Printf %v
    4. Enforce variables types
    5. Basic Types
    6. Show inferred variable type - Printf %T
    7. Show type of variable - reflect.TypeOf
    8. get variable type - %T or reflect.TypeOf
    9. Variable declaration (var)
    10. Default values of variables
    11. Scan input strings from STDIN
    12. if else statement
    13. Converting string to integer - strconv, Atoi
    14. Error Handling
    15. Converting string to integer with error handling - strconv, Itoa
    16. Converting string to float - strconv, ParseFloat
    17. Converting integer to string - strconv, Itoa
    18. Scan STDIN convert to number
    19. Comments
    20. Exercise: circle STDIN
    21. Exercise: rectangular STDIN
    22. Exercise: calculator STDIN
    23. Solution: circle STDIN
    24. Solution: circle STDIN with math
    25. Solution: rectangular STDIN
    26. Solution: calculator STDIN
    27. Solution: calculator STDIN switch
  4. CLI
    1. Args - (argv) command line arguments
    2. Exit early with exit code
    3. Exercise: rectangular
    4. Exercise: calculator
    5. Solution: rectangular CLI
    6. TODO: Solution: calculator CLI
    7. TODO: Solution: calculator (switch)
  5. Skeleton
    1. empty file
    2. Only package main
    3. Other package name
    4. Skeleton file
  6. Numbers
    1. Integer-based operations
    2. Floating-point based operations
    3. Precision
    4. Mixed operations
    5. int8
    6. uint8
    7. Bytes
    8. Byte is uint8
    9. uint16
    10. uint32
    11. Converting values to other types - float32, int, string
    12. Complex numbers
    13. binary - octal - hex
    14. Random
    15. Random with seed
    16. Exercise: One-dimensional spacefight - level 1
    17. Solution: One-dimensiona spacefight - level 1
  7. Boolean - Logical operators
    1. Boolean values - bool, true, false
    2. Boolean truth table
  8. Loops
    1. 3-part for loop
    2. while-like for loop
    3. infinite loop
    4. break out from loop
    5. continue
    6. loop on two variables
    7. break out from internal loop (labels)
    8. Exercise: One-dimensional spacefight
    9. Exercise: FizzBuzz
    10. Solution: One-dimensional spacefight - multiple guesses till hit
    11. Solution: One-dimensional spacefight - allow x
    12. Solution: One-dimensional spacefight - allow m
    13. Solution: FizzBuzz
  9. Strings
    1. Single and double quotes
    2. Runes
    3. Strings
    4. Change string
    5. Strings and Runes
    6. Length of string
    7. iterate over characters in a string
    8. String Contains, HasPrefix, HasSuffix
    9. Split
    10. Join
    11. Split on whitespaces
    12. Newlines
    13. Read line from stdin (keyboard)
    14. Read line from stdin (keyboard) with error handling
    15. Trim line - remove trailing newline from string
    16. Strings and bytes
    17. Scan in a loop
    18. Compare strings
    19. Raw strings
    20. Multiline strings
    21. Exercise: how long is this string?
    22. Exercise: which string is longer?
    23. Exercise: which string is ahead in ABC?
    24. Exercise: which string is ahead - menu
    25. Exercise: Hide substring
    26. Solution: how long is this string?
    27. Solution: which string is longer?
    28. Solution: which string is ahead in ABC?
    29. Solution: which string is ahead - menu
    30. Solution: Hide substring
  10. Arrays
    1. Arrays
    2. Array index out of range - compile time
    3. Array index out of range - run time
    4. Array change value
    5. Arrays automatic length
    6. Array: empty and fill
    7. Empty array of strings
    8. Array assignment (copy)
    9. Array assignment (pointer)
    10. Matrix (two dimensional array)
    11. For loop on array - iterate over array
    12. for loop on values of array (no index)
    13. Arrays conclusion
    14. Exercise: Language Selector
    15. Exercise: count digits
    16. Exercise: count digits from string
    17. Exercise: Report statistics
    18. Solution: Language Selector
    19. Solution: count digits
    20. Solution: count digits from string
    21. Solution: Report statistics
  11. Variables
    1. Variable Declarations
    2. Variables - Naming
    3. Declare multiple variables in one line
    4. Variables cannot be redefined (no new variables on left side of :=)
    5. At least one new variable on the left side of :=
    6. Use the same err on the left hand side
    7. Package variable
    8. Shadowing package variable
    9. Variable scope
  12. Constants
    1. Constants
    2. Constants cannot be changed
    3. Shadowing constants
    4. Constant blocks
    5. iota
    6. iota skipping 0
    7. const powers of 2
  13. Functions
    1. Hello World function
    2. Hello You function (passing parameter)
    3. Function with multiple parameters
    4. Function with return value
    5. Multiple return values
    6. Returning an error from a functions
    7. Named return parameters
    8. Passing a function as a parameter - Callback function
    9. Callback function with one parameter
    10. Anonymous functions
    11. Anonymous functions assigned to name
    12. Numbers are passed by value
    13. Function Overloading - Multiple function with the same name
    14. Defer
    15. Defer early returns
    16. Deferred cd in a function
    17. Defer in if-statements
    18. Defer and parameters
    19. Exercise: Fibonacci
    20. Exercise: Defer remove temporary directory
    21. Exercise: FizzBuzz in function
    22. Exercise: ROT13
    23. Solution: FizzBuzz in function
    24. Solution: ROT13
  14. Slices
    1. Slice of an array
    2. Slice
    3. Change value in slice
    4. Slice Assign
    5. Slice of a slice
    6. Append to a slice
    7. Slice append
    8. Remove last element of slice (pop)
    9. Remove first element of slice (shift, pop(0))
    10. Pre-allocate capacity for slice with make
    11. For loop in slice - iterate over slice
    12. for loop on values of slice (no index)
    13. Merge two slices
    14. Find element in array or slice
    15. Remove element of slice
    16. Weird merge slices
    17. Sort slice
    18. Are values sorted?
    19. Sort strings by length
    20. Sort strings by length and then abc order
    21. Search in slice
    22. Variadic function (arbitrary number of parameters)
    23. Defer and slice
    24. Exercise: count words
    25. Exercise: Create a list of words from sentences
    26. Exercise: Create a unique list of values
    27. Exercise: Reverse Polish Calculator
    28. Exercise: DNA Sequencing
    29. Solution: count words
    30. Solution: Create a list of words from sentences
    31. Solution: Create a unique list of values
    32. Solution: Reverse Polish Calculator
    33. Solution: DNA Sequencing
    34. Solution: DNA Sequencing with in place filter
  15. Files
    1. Read file line-by-line with Scanner
    2. Read file line by line with Reader
    3. Read file as one string (slurp)
    4. Write to file
    5. Write number to file
    6. Append to file
    7. Reading CSV file
    8. Exercise: Sum of numbers in a file
    9. Exercise: Count number of digitis
    10. Exercise: ROT13 on file
    11. Exercise: Selector with list of items from a file
    12. TODO: Solution: Sum of numbers in a file
  16. Maps
    1. Map (hash, dictionary)
    2. Empty Map
    3. Empty Map with make
    4. Map type defintion without container
    5. Create map with data in it already
    6. Delete Map element
    7. Size of map (len)
    8. Access map element (that does not exist)
    9. Map element exists
    10. Increment map elements
    11. Iterate over elements of map
    12. Keys of a map
    13. Sort map
    14. Sort map by value
    15. map of slices
    16. Mixed map
    17. Exercise: count characters
    18. Exercise: count characters - sort by frequency
    19. Exercise: count words
    20. Exercise: count words from file
    21. Solution: count characters
    22. Solution: count characters - sort by frequency
    23. Solution: count words
    24. Solution: count words from file
  17. Testing
    1. Testing in Go
    2. Testing modules
    3. Simple example with testing
    4. Test with failure
    5. Run selected test functions
    6. Exercise: Test Anagram
    7. Exercise: Test Calculator
    8. Exercise: statistics
    9. Solution: Test Anagram
    10. Solution: Test Calculator
    11. Solution: statistics
  18. Struct
    1. Struct and type
    2. Struct with partial information (default values)
    3. Slice of structs
    4. Anonymous struct
    5. Struct in a struct
    6. composition via embedding instead of inheritance
    7. Tags and introspection (reflect)
    8. use cleanenv
    9. methods
    10. method of int
    11. map keys method
    12. method gets copy of struct
    13. method pass pointer of struct
    14. Exercise: read-csv-struct
    15. Exercise: implement 2D point and move
    16. Exercise: implement 3D point and move
    17. Exercise: implement wc
    18. Solution: implement wc
  19. Logging
    1. Simple Logging
    2. Logging Fatal errors
    3. Logging to a file - rewrite
    4. Logging to a file - append
    5. Logging the filename
    6. Logging flags
    7. Logging: Set Prefix
    8. Turn logging on/off
    9. TODO: log levels?
    10. TODO: log function names
    11. TODO: logrotation
  20. Time
    1. Monolitic vs Wallclock time
    2. Time example
    3. Nanoseconds
    4. sleep and elapsed time
    5. Time format
    6. Date Arithmetic
  21. Pointers
    1. Integer assignment is copying (not pointer)
    2. Pointer to integer
    3. Array Pointer
    4. Slice Pointer and copy slice
  22. Panic (Exception handling)
    1. Panic
    2. We Panic
    3. Turn error into panic when port is used
    4. Panic after defer
    5. Recover (and re-panic)
    6. Recover from deep panic
    7. Convert panic to returned error
    8. Exercise: read several files
    9. Solution: read several files
  23. Goroutine
    1. Without goroutine
    2. goroutine example
    3. goroutine not finished yet
    4. goroutine no wait
    5. Global waitgroup for goroutines
    6. Wait for goroutines
    7. Return data from goroutines
    8. Counter - shared variable
    9. Mutex
    10. Channels
    11. Channels are blocking
    12. Channel capacity - buffered channel
    13. Channel with loop
    14. Pipeline map
    15. Pipeline filter
    16. TODO: Pipelines
    17. Fibonacci goroutine
    18. Loop from a channel
    19. Select channel
    20. Delayed start
    21. Job pool
    22. Check for race conditions
    23. Stand alone web application
    24. Maximum processes
    25. Exercise: Collect data from urls
    26. Exercise: Process multiple CSV files
    27. Exercise: counter with lock
    28. Exercise: Fibonacci in parallel
    29. Solution: Collect data from urls
  24. Functions 2
    1. Numbers passed by reference
    2. Array passed by value or by reference
    3. TODO: pass by value, pass by reference
    4. Variable declaration outside of functions
    5. Exercise: Fibonacci series
    6. Exercise: Permutations
    7. Exercise: 100 doors
    8. Solution: Fibonacci series
    9. Solution: Fibonacci recursive
    10. Solution: single counter
    11. Solution: Permutations
    12. Solution: 100 doors
    13. TODO return array
  25. Bitwise
    1. bitwise operators
    2. bitwise left shift
    3. bitwise not
    4. bitwise clear bit - AND NOT
  26. Formatting
    1. Println
    2. Sprintln
    3. Sprintf
    4. Padding and alignment
  27. Filesystem
    1. os.stat information about a file or directory (file exists)
    2. List Directory
    3. Get Current Working Directory (cwd)
    4. Create Temporary Directory
    5. Traverse directory tree
    6. Join parts of a directory or filepath
  28. Regular Expressions (Regexes, Regexp)
    1. Regexp
    2. Regexp
    3. Regex nomatch
    4. Regex Markua include
    5. Exercise: Parse ini file
    6. Exercise: parse hours log file and give report
    7. Solution: Parse ini file
    8. Solution: parse hours log file and give report
  29. Flow Control
    1. if-statements
    2. if, else, else if
    3. if with initializer
    4. Comparision Operators
    5. Short circuit
    6. switch
    7. type switch
  30. JSON
    1. JSON round trip
  31. Web client
    1. http get request
    2. URL parsing
    3. TODO Checking links of a web site
    4. TODO fteching youtube playlist
    5. HTTP GET failure
  32. HTTP Server
    1. HTTP Hello World
    2. HTTP Echo GET
    3. HTTP Echo POST
    4. text/template
    5. text/template with map
    6. text/template with struct
    7. text/template in file
    8. text/template if
    9. text/template loop
    10. html/template
    11. HTTP Hello World templates
  33. External programs
    1. Find executable (which where)
    2. Run external programs
    3. Run external program in the background
    4. Capture the outout of an external program
  34. Distribution
    1. Corss Compilation
    2. Packages
    3. Cross compile
    4. Environment variables
    5. Install packages
    6. Include and distribute external files
    7. go workspace layout
    8. Directory of 3rd party packages
    9. Semantic versioning
    10. go install
  35. Command line arguments (Flag)
    1. Flag
    2. Flags as pointers
    3. Flags as variables
  36. Appendix
    1. Some advanced topics
    2. Resources
    3. Caller filename
    4. os.Executable
    5. Solution: rectangular (STDIN) Reader
    6. Scan int
    7. Function assignment
    8. Overwriting built-in functions
    9. TODO: stack
    10. queue
    11. Left over
    12. Open Web browser
    13. Unicode
    14. golang create io.reader from string
    15. Parse HTML Token by token
    16. Parse HTML extract tags and attributes
  37. Other
    1. Print to STDERR or STDOUT
    2. Companies using Golang in Israel