mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 05:04:05 -08:00
Build with Go 1.18 (#10501)
* Build with Go 1.18 * Update golangci-lint version Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
This commit is contained in:
parent
a1121efc18
commit
c31a3e4c92
|
@ -11,10 +11,10 @@ executors:
|
||||||
# should also be updated.
|
# should also be updated.
|
||||||
golang:
|
golang:
|
||||||
docker:
|
docker:
|
||||||
- image: quay.io/prometheus/golang-builder:1.17-base
|
- image: quay.io/prometheus/golang-builder:1.18-base
|
||||||
golang_oldest:
|
golang_oldest:
|
||||||
docker:
|
docker:
|
||||||
- image: quay.io/prometheus/golang-builder:1.16-base
|
- image: quay.io/prometheus/golang-builder:1.17-base
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_go:
|
test_go:
|
||||||
|
|
4
.github/workflows/golangci-lint.yml
vendored
4
.github/workflows/golangci-lint.yml
vendored
|
@ -20,8 +20,8 @@ jobs:
|
||||||
- name: install Go
|
- name: install Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.x
|
go-version: 1.18.x
|
||||||
- name: Lint
|
- name: Lint
|
||||||
uses: golangci/golangci-lint-action@v3.1.0
|
uses: golangci/golangci-lint-action@v3.1.0
|
||||||
with:
|
with:
|
||||||
version: v1.44.2
|
version: v1.45.2
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
go:
|
go:
|
||||||
# Whenever the Go version is updated here,
|
# Whenever the Go version is updated here,
|
||||||
# .circle/config.yml should also be updated.
|
# .circle/config.yml should also be updated.
|
||||||
version: 1.17
|
version: 1.18
|
||||||
repository:
|
repository:
|
||||||
path: github.com/prometheus/prometheus
|
path: github.com/prometheus/prometheus
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -83,7 +83,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
|
||||||
|
|
||||||
GOLANGCI_LINT :=
|
GOLANGCI_LINT :=
|
||||||
GOLANGCI_LINT_OPTS ?=
|
GOLANGCI_LINT_OPTS ?=
|
||||||
GOLANGCI_LINT_VERSION ?= v1.44.2
|
GOLANGCI_LINT_VERSION ?= v1.45.2
|
||||||
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
|
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
|
||||||
# windows isn't included here because of the path separator being different.
|
# windows isn't included here because of the path separator being different.
|
||||||
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
|
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
|
||||||
|
|
|
@ -31,7 +31,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
kumaConf KumaSDConfig = sdConf
|
kumaConf = sdConf
|
||||||
|
|
||||||
testKumaMadsV1Resources = []*MonitoringAssignment{
|
testKumaMadsV1Resources = []*MonitoringAssignment{
|
||||||
{
|
{
|
||||||
|
|
|
@ -179,7 +179,7 @@ func NewTemplateExpander(
|
||||||
return html_template.HTML(text)
|
return html_template.HTML(text)
|
||||||
},
|
},
|
||||||
"match": regexp.MatchString,
|
"match": regexp.MatchString,
|
||||||
"title": strings.Title,
|
"title": strings.Title, // nolint:staticcheck
|
||||||
"toUpper": strings.ToUpper,
|
"toUpper": strings.ToUpper,
|
||||||
"toLower": strings.ToLower,
|
"toLower": strings.ToLower,
|
||||||
"graphLink": strutil.GraphLinkForExpression,
|
"graphLink": strutil.GraphLinkForExpression,
|
||||||
|
|
Loading…
Reference in a new issue