mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-21 03:16:00 -08:00
Fix linting errors (#198)
This commit is contained in:
parent
23ce9ad9f0
commit
5db6963dea
9
.github/workflows/golangci-lint.yml
vendored
9
.github/workflows/golangci-lint.yml
vendored
|
@ -23,9 +23,12 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.18.x
|
||||||
- name: Lint
|
- name: Lint
|
||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v2
|
||||||
with:
|
with:
|
||||||
version: v1.42.0
|
version: v1.45.2
|
||||||
|
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
@ -19,8 +19,8 @@ jobs:
|
||||||
- name: Upgrade golang
|
- name: Upgrade golang
|
||||||
run: |
|
run: |
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget https://dl.google.com/go/go1.16.8.linux-amd64.tar.gz
|
wget https://dl.google.com/go/go1.17.7.linux-amd64.tar.gz
|
||||||
tar -zxvf go1.16.8.linux-amd64.tar.gz
|
tar -zxvf go1.17.7.linux-amd64.tar.gz
|
||||||
sudo rm -fr /usr/local/go
|
sudo rm -fr /usr/local/go
|
||||||
sudo mv /tmp/go /usr/local/go
|
sudo mv /tmp/go /usr/local/go
|
||||||
cd -
|
cd -
|
||||||
|
|
|
@ -31,7 +31,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
kumaConf KumaSDConfig = sdConf
|
kumaConf = sdConf
|
||||||
|
|
||||||
testKumaMadsV1Resources = []*MonitoringAssignment{
|
testKumaMadsV1Resources = []*MonitoringAssignment{
|
||||||
{
|
{
|
||||||
|
|
|
@ -175,7 +175,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