Make linters happy and disable deprecated exhaustivestruct.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-06-29 13:00:38 +05:00
parent 9d5d5c262e
commit dc1287dae8
8 changed files with 13 additions and 8 deletions

View File

@@ -167,6 +167,7 @@ func (h *handler) ServeHTTP(writer http.ResponseWriter, req *http.Request) {
Version: common.Version,
}
// nolint:errchkjson
infoBytes, _ := json.Marshal(infoData)
writer.WriteHeader(http.StatusOK)

View File

@@ -25,7 +25,7 @@ type HTTPServer struct {
// NewHTTPServer creates HTTP server and executes preliminary initialization
// (HTTP server structure initialized but it doesn't start).
func NewHTTPServer(ctx context.Context, cfg *configuration.Config, logger *logger.Logger) (*HTTPServer, chan struct{}) {
// nolint:exhaustivestruct
// nolint:exhaustruct
httpServer := &HTTPServer{
config: cfg,
ctx: ctx,
@@ -51,7 +51,7 @@ func (h *HTTPServer) initialize() {
handlers: make(map[string]common.HTTPHandlerFunc),
}
// We do not need to specify all possible parameters for HTTP server, so:
// nolint:exhaustivestruct
// nolint:exhaustruct
h.server = &http.Server{
// ToDo: make it all configurable.
Addr: ":34421",