- Try to implement a concurrent version of
wc(1)
that uses a buffered channel. - Next, try to implement a concurrent version of
wc(1)
that uses shared memory. - Finally, try to implement a concurrent version of
wc(1)
that uses a monitor goroutine. - Modify the Go code of
workerPool.go
in order to save the results in a file. Use a mutex and a critical section while dealing with the file, or a monitor goroutine that will keep writing your data on the disk. - What will happen to the
workerPool.go
program when the value of thesize
global variable becomes1
? Why? - Modify the Go code of
workerPool.go
in order to implement the functionality of thewc(1)
command-line utility. - Modify the Go code of
workerPool.go
so that the size of theclients
anddata
buffered channels can be defined as command-line arguments. - Try to write a concurrent version of the
find(1)
command-line utility that uses a monitor goroutine. - Modify the code of
simpleContext.go
so that the anonymous function used in allf1()
,f2()
, and...
Mastering Go
By :
Mastering Go
By:
Overview of this book
<p>Often referred to as Golang (albeit wrongly), the Go programming language is really making strides thanks to some masterclass developments, architected by the greatest programming minds. Shopify CEO Tobias Lutke has been recently quoted as saying “Go will be the server language of the future.” Go programmers are in high demand, but - more controversially - Go takes the stage where C and Unix programmers previously led the way.</p>
<p>The growth of the Go language has seen it become the means by which systems, networking, web, and cloud applications are implemented. If you’re a Go programmer, you’ll already know some Go syntax and will have written some small projects. However, most Go programmers face the difficulty of having to integrate their Golang skills with production code. With Mastering Go, the author shows you just how to tackle this problem. You'll benefit by mastering the use of the libraries and utilize its features, speed, and efficiency for which the Go ecology is justly famous.</p>
<p>Offering a compendium of Go, the book begins with an account of how Go has been implemented. You'll also benefit from an in-depth account of concurrency and systems and network programming imperative for modern-day native cloud development through the course of the book.</p>
Table of Contents (19 chapters)
Title Page
Packt Upsell
Contributors
Preface
Free Chapter
Go and the Operating System
Understanding Go Internals
Working with Basic Go Data Types
The Uses of Composite Types
Enhancing Go Code with Data Structures
What You Might Not Know About Go Packages
Reflection and Interfaces for All Seasons
Telling a Unix System What to Do
Go Concurrency – Goroutines, Channels, and Pipelines
Go Concurrency – Advanced Topics
Code Testing, Optimization, and Profiling
The Foundations of Network Programming in Go
Network Programming – Building Servers and Clients
Other Books You May Enjoy
Index
Customer Reviews