Skip to content
Snippets Groups Projects
Commit 5aa3a422 authored by Lyuben Penkovski's avatar Lyuben Penkovski
Browse files

Update Go version to 1.19 and linters to v1.49.0

parent 1c3b2f34
No related branches found
No related tags found
No related merge requests found
Pipeline #53640 failed with stages
in 2 minutes and 2 seconds
......@@ -16,7 +16,7 @@ include:
- template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'
lint:
image: golangci/golangci-lint:v1.44.2
image: golangci/golangci-lint:v1.49.0
stage: test
tags:
- amd64-docker
......@@ -28,7 +28,7 @@ lint:
- cd /go/src/code.vereign.com/${CI_PROJECT_PATH}
unit tests:
image: golang:1.17.7
image: golang:1.19
extends: .gotest
stage: test
tags:
......
......@@ -12,7 +12,6 @@ linters:
enable:
- megacheck
- govet
- deadcode
- errcheck
- goconst
- gocyclo
......@@ -22,10 +21,9 @@ linters:
- ineffassign
- nakedret
- staticcheck
- structcheck
- unconvert
- varcheck
- vet
- vetshadow
- misspell
- staticcheck
- unused
......@@ -166,11 +166,12 @@ func main() {
var handler http.Handler = mux
srv := &http.Server{
Addr: cfg.HTTP.Host + ":" + cfg.HTTP.Port,
Handler: handler,
IdleTimeout: cfg.HTTP.IdleTimeout,
ReadTimeout: cfg.HTTP.ReadTimeout,
WriteTimeout: cfg.HTTP.WriteTimeout,
Addr: cfg.HTTP.Host + ":" + cfg.HTTP.Port,
Handler: handler,
ReadHeaderTimeout: cfg.HTTP.ReadTimeout,
IdleTimeout: cfg.HTTP.IdleTimeout,
ReadTimeout: cfg.HTTP.ReadTimeout,
WriteTimeout: cfg.HTTP.WriteTimeout,
}
g, ctx := errgroup.WithContext(context.Background())
......@@ -236,7 +237,7 @@ func exposeMetrics(addr string, logger *zap.Logger) {
promMux := http.NewServeMux()
promMux.Handle("/metrics", promhttp.Handler())
logger.Info(fmt.Sprintf("exposing prometheus metrics at %s/metrics", addr))
if err := http.ListenAndServe(addr, promMux); err != nil {
if err := http.ListenAndServe(addr, promMux); err != nil { //nolint:gosec
logger.Error("error exposing prometheus metrics", zap.Error(err))
}
}
FROM golang:1.17.8-alpine3.15 as builder
FROM golang:1.19-alpine3.15 as builder
ENV GOPRIVATE=code.vereign.com
......
FROM golang:1.17.8
FROM golang:1.19
ENV GO111MODULE=on
ENV GOPRIVATE=code.vereign.com
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment