Go programming cookbook : over 85 recipes to build modular, readable, and testable Golang applications across various domains /
Go Programming Cookbook will help you in upgrading your earlier knowledge of Golang. It will help you become a confident developer by exploring different tasks in various domains in a practical environment. The recipes in this book will assist you in finding solutions to common backend/DevOps proble...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham, UK :
Packt Publishing,
[2019]
|
Edición: | Second edition. |
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Title Page; Copyright and Credits; Dedication; About Packt; Contributors; Table of Contents; Preface; Chapter 1: I/O and Filesystems; Technical requirements; Using the common I/O interfaces; How to do it ... ; How it works ... ; Using the bytes and strings packages; How to do it ... ; How it works ... ; Working with directories and files; How to do it ... ; How it works ... ; Working with the CSV format; How to do it ... ; How it works ... ; Working with temporary files; How to do it ... ; How it works ... ; Working with text/template and html/template; How to do it ... ; How it works ...
- Chapter 2: Command-Line ToolsTechnical requirements; Using command-line flags; How to do it ... ; How it works ... ; Using command-line arguments; How to do it ... ; How it works ... ; Reading and setting environment variables; How to do it ... ; How it works ... ; Configuration using TOML, YAML, and JSON; How to do it ... ; How it works ... ; Working with Unix pipes; How to do it ... ; How it works ... ; Catching and handling signals; How to do it ... ; How it works ... ; An ANSI coloring application; How to do it ... ; How it works ... ; Chapter 3: Data Conversion and Composition; Technical requirements
- Converting data types and interface castingHow to do it ... ; How it works ... ; Working with numeric data types using math and math/big; How to do it ... ; How it works ... ; Currency conversions and float64 considerations; How to do it ... ; How it works ... ; Using pointers and SQL NullTypes for encoding and decoding; How to do it ... ; How it works ... ; Encoding and decoding Go data; How to do it ... ; How it works ... ; Structure tags and basic reflection in Go; How to do it ... ; How it works ... ; Implementing collections via closures; How to do it ... ; How it works ... ; Chapter 4: Error Handling in Go
- Technical requirementsHandling errors and the Error interface; How to do it ... ; How it works ... ; Using the pkg/errors package and wrapping errors; How to do it ... ; How it works ... ; Using the log package and understanding when to log errors; How to do it ... ; How it works ... ; Structured logging with the apex and logrus packages; How to do it ... ; How it works ... ; Logging with the context package; How to do it ... ; How it works ... ; Using package-level global variables; How to do it ... ; How it works ... ; Catching panics for long-running processes; How to do it ... ; How it works ...
- Chapter 5: Network ProgrammingTechnical requirements; Writing a TCP/IP echo server and client; How to do it ... ; How it works ... ; Writing a UDP server and client; How to do it ... ; How it works ... ; Working with domain name resolution; How to do it ... ; How it works ... ; Working with WebSockets; How to do it ... ; How it works ... ; Working with net/rpc for calling remote methods; How to do it ... ; How it works ... ; Using net/mail for parsing emails; How to do it ... ; How it works ... ; Chapter 6: All about Databases and Storage; Using the database/sql package with MySQL; Getting ready; How to do it ...