Level Up Your Web Apps With Go /
Go is an open-source language from Google that's a bit like C. Designed for programmer productivity, it's got a clean syntax, and emphasizes concurrency. This book gives you all you need to use Go in your web applications. You'll learn the basic concepts - language structures, the sta...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Collingwood, VIC, Australia :
SitePoint Pty. Ltd,
[2015]
|
Temas: | |
Acceso en línea: | Texto completo Texto completo |
Tabla de Contenidos:
- Intro; Level Up Your Web Apps With Go; Table of Contents; Preface; Welcome New Gopher; Go Types Explored; HTTP; Gophr Part 1: The Project; Gophr Part 2: All About the Users; Gophr Part 3: Remembering Our Users; Gophr Part 4: Images; Gophr Part 5: Concurrency; Automated Testing; Packaging and Production; Who Should Read This Book; Conventions Used; Supplementary Materials; Some Notes; Want to take your learning further?; Installation; Go Tools; Basic Types; Functions; Structs; Exported and Unexported Code; Summary; Custom Types; Interfaces; Embedded Types; The defer Command
- Third-party LibrariesSyntax Options and Conventions; Summary; Responding to Requests; HTML Templates; Rendering JSON; Summary; Using Bootstrap; Project Layout; Serving Assets; Rendering Pages; Creating a Layout; Advanced Routing; Summary; Before We Start; What do users look like?; Hashing a Password; Identifiers; User Forms; Creating Users; Summary; Exercises; What makes up a session?; Persisting User Sessions; Checking for a User; Displaying User Information; Signing Out, Signing In; Editing Your Details; Summary; Exercises; The Image Type; ImageStore Interface; Summary; Exercises
- GoroutinesWaiting for Goroutines to Finish; Communicating with Goroutines; Communicating with Multiple Channels; Putting Goroutines into Practice; Summary; Writing Tests in Go; Code Coverage; Testing HTTP Requests and Responses; Performance Benchmarking; Summary; Exercises; Creating Packages; Dependency Management; Deploying Go Applications; Cross-compiling; That's All, Folks!; Code Samples; Tips, Notes, and Warnings; HTTP Requests; Go Get; Formatting; Imports; Guiding Gently, Not Explicitly; Terminal; The Go Workspace; Your First Go Code; Strings; Numbers; Booleans; Arrays and Slices; Maps
- PointersType Methods; Error Handling; Alternative Syntax Options; Coding Style Conventions; Breaking It Down; Adding More Information; Pattern Matching in Depth; Returning Errors; The Handler Interface; Chaining Handlers to Create Middleware; Accessing Data; Conditionals with if and else; Loops with Range; Multiple Templates; Pipelines; Variables; Marshaling; Marshaling Structs; Custom JSON Keys; Nested Types; Unmarshaling Types; Unknown JSON Structure; Using httprouter; Flexible Middleware; How Routing Works with Our Middleware; Registration Form; Registration Handler; Creating Users
- Persisting UsersThe Sign Out Process; The Login Process; Getting My(SQL) Groove On; MySQL Requirements; Connecting to Databases; Creating ImageStore; Implementing ImageStore in DBImageStore; Uploading Images; Using Channels and Selects for Timeouts; Looping on selects; Throwing Away Goroutines; Using the Resized Images; Passing and Failing; Testing Multiple Variations of Inputs; Testing Between Packages; Testing the Gophr Authentication; Testing Remote HTTP requests; Benchmark Regressions; What is a package?; An Example Package; Exporting; Avoiding Circular Imports