Veze, linkovi
Kompjuter biblioteka
Korpa
Mastering Go - Second Edition

Web design Web design

Mastering Go - Second Edition

Autor: Mihalis Tsoukalos
Broj strana: 798
ISBN broj: 9781838559335
Izdavač: PACKT PUBLISHING PACKT PUBLISHING
Godina izdanja: 2019.

Pregleda (30 dana / ukupno): 18 / 127

                 
Twitter   Facebook   Linkedin   Pinterest   Email
                 
Predlog za prevod

 

Kupite na Amazonu

 

  • Clear guidance on using Go for production systems
  • Detailed explanations of how Go internals work, the design choices behind the language, and how to optimize your Go code
  • A full guide to all Go data types, composite types, and data structures
  • Master packages, reflection, and interfaces for effective Go programming
  • Build high-performance systems networking code, including server and client-side applications
  • Interface with other systems using WebAssembly, JSON, and gRPC
  • Write reliable, high-performance concurrent code
  • Build machine learning systems in Go, from simple statistical regression to complex neural networks

Often referred to (incorrectly) as Golang, Go is the high-performance systems language of the future. Mastering Go, Second Edition helps you become a productive expert Go programmer, building and improving on the groundbreaking first edition. Mastering Go, Second Edition shows how to put Go to work on real production systems. For programmers who already know the Go language basics, this book provides examples, patterns, and clear explanations to help you deeply understand Go’s capabilities and apply them in your programming work. The book covers the nuances of Go, with in-depth guides on types and structures, packages, concurrency, network programming, compiler design, optimization, and more. Each chapter ends with exercises and resources to fully embed your new knowledge. This second edition includes a completely new chapter on machine learning in Go, guiding you from the foundation statistics techniques through simple regression and clustering to classification, neural networks, and anomaly detection. Other chapters are expanded to cover using Go with Docker and Kubernetes, Git, WebAssembly, JSON, and more. If you take the Go programming language seriously, the second edition of this book is an essential guide on expert techniques.

  • Second edition of the bestselling guide to advanced Go programming, expanded to cover machine learning, more Go packages and a range of modern development techniques
  • Completes the Go developer’s education with real-world guides to building high-performance production systems
  • Packed with practical examples and patterns to apply to your own development work
  • Clearly explains Go nuances and features to remove the frustration from Go development

Table of contents

1 Go and the Operating System
The history of Go
Where is Go going?
The advantages of Go
Compiling Go code
Executing Go code
Two Go rules
Downloading Go packages
UNIX stdin, stdout, and stderr
About printing output
Using standard output
Getting user input
About error output
Writing to log files
Error handling in Go
Using Docker
Exercises and links
Summary

2 Understanding Go Internals
The Go compiler
Garbage collection
Calling C code from Go
Calling Go functions from C code
The defer keyword
Panic and recover
Two handy UNIX utilities
Your Go environment
The go env command
The Go assembler
Node trees
Finding out more about go build
Creating WebAssembly code
General Go coding advice
Exercises and links
Summary

3 Working with Basic Go Data Types
Numeric data types
Go loops
Go arrays
Go slices
Go maps
Go constants
Go pointers
Times and dates
Measuring execution time
Web links and exercises
Summary

4 The Uses of Composite Types
About composite types
Structures
Tuples
Regular expressions and pattern matching
Strings
The switch statement
Calculating Pi with high accuracy
Developing a key-value store in Go
Go and the JSON format
Go and the YAML format
Additional resources
Exercises and web links
Summary

5 How to Enhance Go Code with Data Structures
About graphs and nodes
Algorithm complexity
Binary trees in Go
Hash tables in Go
Linked lists in Go
Doubly linked lists in Go
Queues in Go
Stacks in Go
The container package
Generating random numbers
Generating secure random numbers
Performing matrix calculations
Solving Sudoku puzzles
Additional resources
Exercises
Summary

6 What You Might Not Know About Go Packages and Functions
About Go packages
About Go functions
Developing your own Go packages
Go modules
Creating good Go packages
The syscall package
The go/scanner, go/parser, and go/token packages
Text and HTML templates
Additional resources
Exercises
Summary

7 Reflection and Interfaces for All Seasons
Type methods
Go interfaces
Writing your own interfaces
Reflection
Object-oriented programming in Go
An introduction to git and GitHub
Debugging with Delve
Additional resources
Exercises
Summary

8 Telling a UNIX System What to Do
About UNIX processes
The flag package
The viper package
The cobra package
The io.Reader and io.Writer Interfaces
The bufio package
Reading text files
Reading a specific amount of data
The advantages of binary formats
Reading CSV files
Writing to a file
Loading and saving data on disk
The strings package revisited
About the bytes package
File permissions
Handling UNIX signals
Programming UNIX pipes in Go
About syscall.PtraceRegs
Tracing system calls
User ID and group ID
The Docker API and Go
Additional resources
Exercises
Summary

9 Concurrency in Go – Goroutines, Channels, and Pipelines
About processes, threads, and goroutines
Goroutines
Waiting for your goroutines to finish
Channels
Pipelines
Race conditions
Comparing Go and Rust concurrency models
Comparing Go and Erlang concurrency models
Additional resources
Exercises
Summary

10 Concurrency in Go – Advanced Topics
The Go scheduler revisited
The select keyword
Timing out a goroutine
Go channels revisited
Shared memory and shared variables
Revisiting the go statement
Catching race conditions
The context package
Additional resources
Exercises
Summary

11 Code Testing, Optimization, and Profiling
About optimization
Optimizing Go code
Profiling Go code
The go tool trace utility
Testing Go code
Testing an HTTP server with a database backend
Benchmarking Go code
A simple benchmarking example
Benchmarking buffered writing
Finding unreachable Go code
Cross-compilation
Creating example functions
From Go code to machine code
Generating documentation
Using Docker images
Additional resources
Exercises
Summary

12 The Foundations of Network Programming in Go
About net/http, net, and http.RoundTripper
About TCP/IP
About IPv4 and IPv6
The nc(1) command-line utility
Reading the configuration of network interfaces
Performing DNS lookups
Creating a web server in Go
HTTP tracing
Creating a web client in Go
Timing out HTTP connections
The Wireshark and tshark tools
gRPC and Go
Additional resources
Exercises
Summary

13 Network Programming – Building Your Own Servers and Clients
Working with HTTPS traffic
The net standard Go package
A TCP client
A TCP server
A UDP client
Developing a UDP server
A concurrent TCP server
Creating a Docker image for a Go TCP/IP server
Remote Procedure Call (RPC)
Doing low-level network programming
Additional resources
Exercises
Summary

14 Machine Learning in Go
Calculating simple statistical properties
Regression
Classification
Clustering
Anomaly detection
Neural networks
Outlier analysis
Working with TensorFlow
Talking to Kafka
Additional resources
Exercises
Summary
Where to go next?

 

Budite prvi koji će ostaviti komentar.

Ostavite komentar Ostavite komentar

 

Preporučujemo

Offline First Web Development

Offline First Web Development

Learning ClojureScript

Learning ClojureScript

Veze, linkovi
Linkedin Twitter Facebook
 
     
 
© Sva prava pridržana, Kompjuter biblioteka, Beograd, Obalskih radnika 4a, Telefon: +381 11 252 0 272