HTTP server middleware
Id: 296
SOId: 9343
Introduction
In Go Middleware can be used to execute code before and after handler function. It uses the power of Single Function Interfaces. Can be introduced at any time without affecting the other middleware. For Ex: Authentication logging can be added in later stages of development without disturbing the existing code.
Remarks
The Signature of middleware should be (http.ResponseWriter, *http.Request) i.e. of http.handlerFunc type.
HTTP server middleware/
Table Of Contents
5
Strings
6
Pointers
7
Arrays
8
Slices
9
Maps
10
Structs
11
Interfaces
16
Functions
17
Methods
19
Defer
21
Concurrency
23
Mutex
24
Packages
28
Logging
31
JSON
32
XML
33
CSV
34
YAML
35
SQL
36
HTTP Client
37
HTTP Server
39
Reflection
40
Context
41
Fmt
43
Testing
49
gob
50
Vendoring
51
Plugin
52
HTTP server middleware
54
Console I/O
55
Cryptography
57
Images
60
Contributors