Directories
¶
| Path | Synopsis |
|---|---|
|
Extra
|
|
|
Concurrency/ExtraExercises/fanin
command
|
|
|
Concurrency/ExtraExercises/hard
command
|
|
|
Concurrency/ExtraExercises/leaks
command
|
|
|
Concurrency/ExtraExercises/merge
command
|
|
|
Concurrency/Projects
command
|
|
|
Concurrency/Projects/Generator
command
|
|
|
Concurrency/Projects/LinkChecker
command
|
|
|
Concurrency/Projects/LinkChecker/Template
command
Program to feed URLs and display status code, runs parallel requests.
|
Program to feed URLs and display status code, runs parallel requests. |
|
Concurrency/Scratch
command
|
|
|
Concurrency/channels/advanced/example1
command
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
command
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
command
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
command
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
command
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
command
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
command
Parallel link checker.
|
Parallel link checker. |
|
Concurrency/channels/exercises/exercise1
command
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
command
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
command
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
command
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
command
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
command
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
command
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
command
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/context/example1
command
|
|
|
Concurrency/context/example2
command
|
|
|
Concurrency/csp/example1
command
|
|
|
Concurrency/goroutines/example1
command
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
command
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
command
Create a program that declares two anonymous functions.
|
Create a program that declares two anonymous functions. |
|
Concurrency/goroutines/exercises/template1
command
Create a program that declares two anonymous functions.
|
Create a program that declares two anonymous functions. |
|
Concurrency/select/example1
command
|
|
|
Concurrency/select/example2
command
|
|
|
Concurrency/signal
command
|
|
|
Concurrency/timeout
command
|
|
|
Mock
command
Package mock_main is a generated GoMock package.
|
Package mock_main is a generated GoMock package. |
|
Patterns/AggregateError
command
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/ChannelLenCap
command
|
|
|
Patterns/Context/example1
command
|
|
|
Patterns/Context/example2
command
Cancellation example without context.
|
Cancellation example without context. |
|
Patterns/Context/example3
command
|
|
|
Patterns/Context/example4
command
|
|
|
Patterns/Context/example5
command
|
|
|
Patterns/Context/example6
command
|
|
|
Patterns/Defer
command
|
|
|
Patterns/Errgroup/example1
command
|
|
|
Patterns/Errgroup/example2
command
|
|
|
Patterns/Errgroup/example3
command
|
|
|
Patterns/GoEmbed
command
|
|
|
Patterns/GoGenerate/example1
command
|
|
|
Patterns/Infinite
command
|
|
|
Patterns/Mistakes/Embedding
command
|
|
|
Patterns/NestedGoroutines
command
|
|
|
Patterns/Rot13
command
|
|
|
Patterns/Validation/custom
command
|
|
|
Patterns/Validation/simple
command
|
|
|
Patterns/Validation/struct-level
command
|
|
|
Patterns/Validation/translations
command
|
|
|
Services/00-server
command
|
|
|
Services/01-server-handlerfunc
command
|
|
|
Services/02-server-handler
command
|
|
|
Services/03-server-handle
command
|
|
|
Services/04-server-handlefunc
command
|
|
|
Services/05-two-handlers
command
|
|
|
Services/06-handler-methods
command
|
|
|
Services/07-methods
command
|
|
|
Services/08-post
command
|
|
|
Services/10-mux
command
|
|
|
Services/11-gorilla-mux
command
|
|
|
Services/HttpTest/Server
command
|
|
|
Services/Todo
command
|
|
|
Services/exercises/exercise1
command
|
|
|
Services/exercises/template1
command
|
|
|
Services/final
command
|
|
|
tasks
|
|
|
asciitable
command
|
|
|
btcprice
command
|
|
|
datareader
command
|
|
|
generator
command
|
|
|
helloworld
command
|
|
|
linkchecker
command
|
|
|
randomimg
command
|
|
|
switch
command
|
|
|
timer
command
|
|
|
vardecl
command
|
|
|
wordfreq
command
|
|
|
tasks-solved
|
|
|
asciitable
command
|
|
|
btcprice
command
|
|
|
datareader
command
|
|
|
generator
command
|
|
|
helloworld
command
|
|
|
linkchecker
command
|
|
|
randomimg
command
|
|
|
sliceops
command
|
|
|
strlen
command
|
|
|
switch
command
|
|
|
timer
command
|
|
|
vardecl
command
|
|
|
wordfreq
command
|
|
|
x
|
|
|
ErrorHandling/AdHoc
command
|
|
|
ErrorHandling/ErrVerb
command
|
|
|
ErrorHandling/WrapError
command
|
|
|
MapExtra/Set
command
|
|
|
SlicesExtra/SliceAppendToNil
command
|
|
|
SlicesExtra/SliceBatching
command
|
|
|
SlicesExtra/SliceCut
command
|
|
|
SlicesExtra/SliceCutSafe
command
|
|
|
SlicesExtra/SliceDeleteSafe
command
|
|
|
SlicesExtra/SliceExpand
command
|
|
|
SlicesExtra/SliceExtend
command
|
|
|
SlicesExtra/SliceFilter
command
|
|
|
SlicesExtra/SliceFilterNoAlloc
command
|
|
|
SlicesExtra/SliceGotchaAppend
command
|
|
|
SlicesExtra/SliceGrow
command
|
|
|
SlicesExtra/SliceMakeVsNew
command
|
|
|
SlicesExtra/SliceSize
command
|
|
|
SlicesExtra/SliceStorage
command
|
|
|
addmethod
command
|
|
|
chandrop
command
|
|
|
constructors
command
Examples for contructing types.
|
Examples for contructing types. |
|
embedlock
command
|
|
|
encjson
command
|
|
|
encxml
command
|
|
|
errors
command
|
|
|
exerciseslices
command
|
|
|
forloop
command
|
|
|
fromscratch
command
|
|
|
gochanunbuf
command
|
|
|
godebug
command
Sample program to review scheduler stats.
|
Sample program to review scheduler stats. |
|
goroutine
command
|
|
|
goroutineid
command
|
|
|
grmillion
command
|
|
|
grsize
command
|
|
|
hello
command
|
|
|
hellojp
command
|
|
|
helloworld
command
|
|
|
httprangereaderat
command
$ go run main.go | wc -l 9252
|
$ go run main.go | wc -l 9252 |
|
ifshort
command
|
|
|
interfaces
command
|
|
|
iointerfaces
command
|
|
|
ioreader
command
|
|
|
manygoroutines
command
|
|
|
mapinit
command
|
|
|
numcpu
command
|
|
|
pingpong
command
|
|
|
readerimpl
command
|
|
|
rgba
command
|
|
|
runevalue
command
|
|
|
scratch
command
|
|
|
sliceappend
command
|
|
|
slicehello
command
|
|
|
sliceindex
command
|
|
|
sliceinit
command
|
|
|
stringloop
command
|
|
|
structembed
command
|
|
|
structinit
command
|
|
|
switch
command
|
|
|
synccond
command
|
|
|
timeout
command
|
|
|
unicodeisletter
command
|
|
|
vars
command
|
|
|
waitgroup
command
|
|
|
waitgroupfetch
command
|
|
|
workerqueue
command
|
Click to show internal directories.
Click to hide internal directories.