- Building Microservices with Go
- Nic Jackson
- 101字
- 2021-07-15 17:28:04
Context
The problem with the previous pattern is that there is no way that you can pass the validated request from one handler to the next without breaking the http.Handler interface, but guess what Go has us covered. The context package was listed as experimental for several years before finally making it in to the standard package with Go 1.7. The Context type implements a safe method for accessing request-scoped data that is safe to use simultaneously by multiple Go routines. Let’s take a quick look at this package and then update our example to see it in use.
推薦閱讀
- Raspberry Pi for Python Programmers Cookbook(Second Edition)
- JavaScript前端開發模塊化教程
- Mobile Application Development:JavaScript Frameworks
- 深入理解Django:框架內幕與實現原理
- Learning SAP Analytics Cloud
- Vue.js 3.0源碼解析(微課視頻版)
- Python:Master the Art of Design Patterns
- Mastering Linux Security and Hardening
- RESTful Java Web Services(Second Edition)
- MINECRAFT編程:使用Python語言玩轉我的世界
- UML2面向對象分析與設計(第2版)
- Android Studio開發實戰:從零基礎到App上線 (移動開發叢書)
- Python Machine Learning Cookbook
- Java高級程序設計
- JavaEE架構與程序設計