fixed copy paste comment issues. closes #706
Bas van Beek
5 years ago
54 | 54 | // ServerOption sets an optional parameter for servers. |
55 | 55 | type ServerOption func(*Server) |
56 | 56 | |
57 | // ServerBefore functions are executed on the HTTP request object before the | |
57 | // ServerBefore functions are executed on the gRPC request object before the | |
58 | 58 | // request is decoded. |
59 | 59 | func ServerBefore(before ...ServerRequestFunc) ServerOption { |
60 | 60 | return func(s *Server) { s.before = append(s.before, before...) } |
61 | 61 | } |
62 | 62 | |
63 | // ServerAfter functions are executed on the HTTP response writer after the | |
63 | // ServerAfter functions are executed on the gRPC response writer after the | |
64 | 64 | // endpoint is invoked, but before anything is written to the client. |
65 | 65 | func ServerAfter(after ...ServerResponseFunc) ServerOption { |
66 | 66 | return func(s *Server) { s.after = append(s.after, after...) } |