gows

module
v0.0.0-...-79b2278 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2022 License: MIT

README

Go Workshop Notes

instructor: about

Outline

  • Introduction
    • Motivation and Landscape
    • Hello World
    • Task: "helloworld"
  • History
    • Timeline of events
  • More First Programs
    • Entry point
    • Importing Code
    • Visibility (public, private)
  • Language Overview
    • Basic Types
    • Variable Declarations
    • Control Structures: if, for, switch
  • More Types
    • Slices
    • Maps
  • Interfaces
    • Structural Typing
    • Small interfaces
    • Variants (basic, embedding, general, ref/spec)
  • Go OOP?
    • Is Go object oriented? FAQ
  • Error Handling
    • Custom Error Types
    • Wrapping and unwrapping errors
  • Project Layout
    • typical structure
    • naming recommendations
    • import path and resolution
    • Go modules
    • mixing public and private code
    • versioning libraries
  • IO
    • working with files
    • readers and writers
  • Serialization
    • struct tags
    • JSON
    • XML
  • Testing Go Code
    • Unit Test
    • Subtests
    • Benchmarks
    • Testcontainers
  • Concurrency
    • classic and CSP style
    • goroutines
    • channels
    • select
    • the sync package
    • error handling
    • helpers: errgroup
  • HTTP clients
    • clients and transport
    • standard clients, third party clients
  • HTTP servers
    • handlers
    • router, e.g. gorilla/mux
    • testing
  • Database access
    • package db, db/sql
    • database drivers
    • sqlx helper

Follow up:

  • Linkchecker
  • Project layout, modules
    • add library
    • add service
  • Services
  • Misc

Directories

Path Synopsis
Extra
Concurrency/Projects/LinkChecker/Template
Program to feed URLs and display status code, runs parallel requests.
Program to feed URLs and display status code, runs parallel requests.
Concurrency/channels/advanced/example1
Sample program to show the order of channel communication for unbuffered, buffered and closing channels based on the specification.
Sample program to show the order of channel communication for unbuffered, buffered and closing channels based on the specification.
Concurrency/channels/example1
This sample program demonstrates the basic channel mechanics for goroutine signaling.
This sample program demonstrates the basic channel mechanics for goroutine signaling.
Concurrency/channels/example2
Sample program to show how to use an unbuffered channel to simulate a game of tennis between two goroutines.
Sample program to show how to use an unbuffered channel to simulate a game of tennis between two goroutines.
Concurrency/channels/example3
Sample program to show how to use an unbuffered channel to simulate a relay race between four goroutines.
Sample program to show how to use an unbuffered channel to simulate a relay race between four goroutines.
Concurrency/channels/example4
This sample program demonstrates how to use a buffered channel to receive results from other goroutines in a guaranteed way.
This sample program demonstrates how to use a buffered channel to receive results from other goroutines in a guaranteed way.
Concurrency/channels/example5
This sample program demonstrates how to use a channel to monitor the amount of time the program is running and terminate the program if it runs too long.
This sample program demonstrates how to use a channel to monitor the amount of time the program is running and terminate the program if it runs too long.
Concurrency/channels/example6
Parallel link checker.
Parallel link checker.
Concurrency/channels/exercises/exercise1
Write a program where two goroutines pass an integer back and forth ten times.
Write a program where two goroutines pass an integer back and forth ten times.
Concurrency/channels/exercises/exercise2
Write a program that uses a fan out pattern to generate 100 random numbers concurrently.
Write a program that uses a fan out pattern to generate 100 random numbers concurrently.
Concurrency/channels/exercises/exercise3
Write a program that uses goroutines to generate up to 100 random numbers.
Write a program that uses goroutines to generate up to 100 random numbers.
Concurrency/channels/exercises/exercise4
Write a program that creates a fixed set of workers to generate random numbers.
Write a program that creates a fixed set of workers to generate random numbers.
Concurrency/channels/exercises/template1
Write a program where two goroutines pass an integer back and forth ten times.
Write a program where two goroutines pass an integer back and forth ten times.
Concurrency/channels/exercises/template2
Write a program that uses a fan out pattern to generate 100 random numbers concurrently.
Write a program that uses a fan out pattern to generate 100 random numbers concurrently.
Concurrency/channels/exercises/template3
Write a program that uses goroutines to generate up to 100 random numbers.
Write a program that uses goroutines to generate up to 100 random numbers.
Concurrency/channels/exercises/template4
Write a program that creates a fixed set of workers to generate random numbers.
Write a program that creates a fixed set of workers to generate random numbers.
Concurrency/goroutines/example1
Sample program to show how to create goroutines and how the scheduler behaves.
Sample program to show how to create goroutines and how the scheduler behaves.
Concurrency/goroutines/example2
Sample program to show how the goroutine scheduler will time slice goroutines on a single thread.
Sample program to show how the goroutine scheduler will time slice goroutines on a single thread.
Concurrency/goroutines/exercises/exercise1
Create a program that declares two anonymous functions.
Create a program that declares two anonymous functions.
Concurrency/goroutines/exercises/template1
Create a program that declares two anonymous functions.
Create a program that declares two anonymous functions.
Mock
Package mock_main is a generated GoMock package.
Package mock_main is a generated GoMock package.
Patterns/AggregateError
https://github.com/kubernetes/apimachinery/blob/06deae5c9c2c030d771a467e086b6c791e8800dc/pkg/util/errors/errors.go#L231-L246
https://github.com/kubernetes/apimachinery/blob/06deae5c9c2c030d771a467e086b6c791e8800dc/pkg/util/errors/errors.go#L231-L246
Patterns/Context/example2
Cancellation example without context.
Cancellation example without context.
tasks
tasks-solved
x
constructors
Examples for contructing types.
Examples for contructing types.
godebug
Sample program to review scheduler stats.
Sample program to review scheduler stats.
httprangereaderat
$ go run main.go | wc -l 9252
$ go run main.go | wc -l 9252

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL