- 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.
推薦閱讀
- Learning Java Functional Programming
- Computer Vision for the Web
- Oracle從新手到高手
- Hands-On Data Structures and Algorithms with JavaScript
- PHP 編程從入門到實踐
- Java程序設計與實踐教程(第2版)
- Unity Game Development Scripting
- 精通Python自動化編程
- C#實踐教程(第2版)
- Instant Lucene.NET
- C語言程序設計
- Visual Basic 6.0程序設計實驗教程
- Beginning C++ Game Programming
- 零基礎學C語言程序設計
- 并行編程方法與優化實踐