更新时间:2021-06-25 21:39:53
封面
版权信息
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Code in Action
Conventions used
Get in touch
Reviews
Understanding HTTP Go and Echo
Technical requirements
HTTP basics
HTTP request
HTTP response
Go HTTP handlers
Go HTTP web server
Reasons for a framework
Setting up the environment
Setting up Echo
Summary
Developing Echo Projects
Setting up a project in echo and organizing code
Implementing a project
Dependency management
Routing and handlers
Routing
Handlers
Middleware
Custom middleware
Rendering
Exploring Routing Capabilities
Basic handler routing
Adding routes
How Echo routing works
Group routing
Router implementation considerations
In action
Implementing Middleware
Basics of middleware processing
Middleware chaining
Creating custom middleware
Utilizing the Request Context and Data Bindings
Maintaining context
Globally requesting context mapping
The new handler function type
Hiding context within a request
Post Go 1.7
Echo context
Request binding
Response rendering
echo.Response
Performing Logging and Error Handling
Logging
Echo's Logger interface
Log levels
Logger middleware
Error handling
Handling application panics
Testing Applications
Types of testing
Unit testing
Benchmark testing
Behavior testing
Integration testing
Security testing
Unit testing middleware and handler code
Benchmark testing web applications
External behavior and integration testing
Providing Templates and Static Content
Serving static files
Template basics
Templates within Echo
Calling Echo from templates
Other Books You May Enjoy