From 57a5449b57c39e993c0f2caf354bec0d0f27cd2b Mon Sep 17 00:00:00 2001 From: Nikita Rusin Date: Mon, 9 Oct 2023 22:23:07 +0200 Subject: [PATCH] Add learning links for all --- challenge/files/00_tutorial.toml | 10 +++++++++- challenge/files/01_structs.toml | 2 +- challenge/files/02_mutex.toml | 18 +++++++++++++++++- challenge/files/03_mutex_2.toml | 21 ++++++++++++++++++++- challenge/files/04_rwmutex.toml | 10 +++++++++- challenge/files/05_waitgroup.toml | 14 +++++++++++++- challenge/files/06_parrallel_queries.toml | 18 +++++++++++++++++- challenge/files/07_channels_1.toml | 14 +++++++++++++- challenge/files/08_channels_2.toml | 14 +++++++++++++- 9 files changed, 112 insertions(+), 9 deletions(-) diff --git a/challenge/files/00_tutorial.toml b/challenge/files/00_tutorial.toml index de7dcf3..e86637a 100644 --- a/challenge/files/00_tutorial.toml +++ b/challenge/files/00_tutorial.toml @@ -15,7 +15,11 @@ func main() { fmt.Println(funCat) } """ -learning_advise = "You need to be familiar with structure, method, pointer and pointer receiver concepts." +learning_advise = """ +If you can't find issue. That means you need to learn language basics. Use this links. + +Answer: changeColor is value receiver function. Use pointer receiver to modify structure value. +""" [[learning_links]] title = "Tour of Go" @@ -25,6 +29,10 @@ url = "https://go.dev/tour/welcome/1" title = "Go by Example" url = "https://gobyexample.com/" +[[learning_links]] +title = "Gopherlings" +url = "https://github.com/soypat/gopherlings" + [[learning_links]] title = "Learn Go With Tests" url = "https://quii.gitbook.io/learn-go-with-tests/" diff --git a/challenge/files/01_structs.toml b/challenge/files/01_structs.toml index 55ac313..f0339b8 100644 --- a/challenge/files/01_structs.toml +++ b/challenge/files/01_structs.toml @@ -23,7 +23,7 @@ func main() { learning_advise = """ Go functions gets a copy of argument values. We use pointers to avoid value copying. But pointer is value too. -Play with pointers. Read about value receiver vs pointer receiver. +Play with pointers. Learn about value receiver vs pointer receiver. """ [[learning_links]] diff --git a/challenge/files/02_mutex.toml b/challenge/files/02_mutex.toml index 8052a2a..82d089e 100644 --- a/challenge/files/02_mutex.toml +++ b/challenge/files/02_mutex.toml @@ -28,7 +28,23 @@ func C() { chain = chain + " --> C" } """ -learning_advise = "Read sync.Mutex docs and play with this code" +learning_advise = "Read sync.Mutex docs and find deadlock." + +[[learning_links]] +title = "Docs" +url = "https://pkg.go.dev/sync#Mutex" + +[[learning_links]] +title = "Tour of Go" +url = "https://go.dev/tour/concurrency/9" + +[[learning_links]] +title = "Go by Example" +url = "https://gobyexample.com/mutexes" + +[[learning_links]] +title = "Learn Go With Tests" +url = "https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/sync" [[questions]] text = "Select program output" diff --git a/challenge/files/03_mutex_2.toml b/challenge/files/03_mutex_2.toml index 7361cff..3744828 100644 --- a/challenge/files/03_mutex_2.toml +++ b/challenge/files/03_mutex_2.toml @@ -24,7 +24,26 @@ func (m *Map) Len() int { return len(m.m) } """ -learning_advise = "Read sync.Mutex docs, find map zero value and play with this code" +learning_advise = """ +1. Read sync.Mutex docs +2. map zero value is nil +""" + +[[learning_links]] +title = "Docs" +url = "https://pkg.go.dev/sync#Mutex" + +[[learning_links]] +title = "Tour of Go" +url = "https://go.dev/tour/concurrency/9" + +[[learning_links]] +title = "Go by Example" +url = "https://gobyexample.com/mutexes" + +[[learning_links]] +title = "Learn Go With Tests" +url = "https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/sync" [[questions]] text = "This structure is used in other packages. Find issues." diff --git a/challenge/files/04_rwmutex.toml b/challenge/files/04_rwmutex.toml index 0a4745d..471d683 100644 --- a/challenge/files/04_rwmutex.toml +++ b/challenge/files/04_rwmutex.toml @@ -29,7 +29,15 @@ func C() { defer mu.RUnlock() } """ -learning_advise = "Read sync.RWMutex docs and play with this code" +learning_advise = "Read sync.RWMutex docs, it works different than Mutex" + +[[learning_links]] +title = "Docs" +url = "https://pkg.go.dev/sync#RWMutex" + +[[learning_links]] +title = "Tour of Go" +url = "https://go.dev/tour/concurrency/9" [[questions]] text = "Select program output" diff --git a/challenge/files/05_waitgroup.toml b/challenge/files/05_waitgroup.toml index 3de52c9..2ee736a 100644 --- a/challenge/files/05_waitgroup.toml +++ b/challenge/files/05_waitgroup.toml @@ -14,7 +14,19 @@ func main() { fmt.Println("Done") } """ -learning_advise = "Read sync.WaitGroup docs and play with this code" +learning_advise = "Read sync.WaitGroup docs" + +[[learning_links]] +title = "Docs" +url = "https://pkg.go.dev/sync#WaitGroup" + +[[learning_links]] +title = "Go by Example" +url = "https://gobyexample.com/waitgroups" + +[[learning_links]] +title = "Learn Go With Tests" +url = "https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/sync" [[questions]] text = "Select program output" diff --git a/challenge/files/06_parrallel_queries.toml b/challenge/files/06_parrallel_queries.toml index f11a230..84643d7 100644 --- a/challenge/files/06_parrallel_queries.toml +++ b/challenge/files/06_parrallel_queries.toml @@ -31,7 +31,23 @@ func main() { fmt.Println(callResults...) } """ -learning_advise = "Read sync.WaitGroup, sync.Mutex docs and play with this code" +learning_advise = "Read sync.WaitGroup, sync.Mutex docs" + +[[learning_links]] +title = "Docs" +url = "https://pkg.go.dev/sync#WaitGroup" + +[[learning_links]] +title = "Go by Example: WaitGroup" +url = "https://gobyexample.com/waitgroups" + +[[learning_links]] +title = "Go by Example: Mutex" +url = "https://gobyexample.com/mutexes" + +[[learning_links]] +title = "Learn Go With Tests" +url = "https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/sync" [[questions]] text = "Select program output" diff --git a/challenge/files/07_channels_1.toml b/challenge/files/07_channels_1.toml index 391a0b2..dc27cb2 100644 --- a/challenge/files/07_channels_1.toml +++ b/challenge/files/07_channels_1.toml @@ -19,7 +19,19 @@ func main() { } } """ -learning_advise = "Read about channels, buffered channels and play with this code" +learning_advise = "Learn about channels, buffered channels and channel close" + +[[learning_links]] +title = "Tour of Go" +url = "https://go.dev/tour/concurrency/2" + +[[learning_links]] +title = "Go by Example" +url = "https://gobyexample.com/channels" + +[[learning_links]] +title = "Learn Go With Tests" +url = "https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/concurrency" [[questions]] text = "Select program output" diff --git a/challenge/files/08_channels_2.toml b/challenge/files/08_channels_2.toml index c2e0f32..1044c0d 100644 --- a/challenge/files/08_channels_2.toml +++ b/challenge/files/08_channels_2.toml @@ -19,7 +19,19 @@ func main() { fmt.Println(count) } """ -learning_advise = "Read about channels, channel closing and play with this code" +learning_advise = "Learn about channels, buffered channels and channel close" + +[[learning_links]] +title = "Tour of Go" +url = "https://go.dev/tour/concurrency/2" + +[[learning_links]] +title = "Go by Example" +url = "https://gobyexample.com/channels" + +[[learning_links]] +title = "Learn Go With Tests" +url = "https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/concurrency" [[questions]] text = "Select program output"