Some fixes suggested by golangci-lint
This commit is contained in:
@@ -5,10 +5,25 @@ import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
// Handler represents an open HTTP connection in the User Server.
|
||||
//
|
||||
// This struct contains the connection Writer and Request to be managed
|
||||
// by endpoints of the Data Server.
|
||||
type Handler struct {
|
||||
Id string
|
||||
Route *Route
|
||||
// ID is unique identifier of the request.
|
||||
ID string
|
||||
|
||||
// Route is a reference to the original route that matched this
|
||||
// request.
|
||||
Route *Route
|
||||
|
||||
// Writing is a mutex that prevents two goroutines from writing at
|
||||
// the same time in the response.
|
||||
Writing sync.Mutex
|
||||
Writer http.ResponseWriter
|
||||
|
||||
// Request is a pointer to the in-progress request.
|
||||
Request *http.Request
|
||||
|
||||
// Writer is the original http.ResponseWriter of the request.
|
||||
Writer http.ResponseWriter
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user