Skip to content

Commit

Permalink
Merge branch 'main' into renovate/github.com-prometheus-client_golang…
Browse files Browse the repository at this point in the history
…-1.x
  • Loading branch information
juusujanar committed Apr 22, 2024
2 parents 5da432d + 5ffe7ed commit 2d37404
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 19 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ on:
- "scripts/errcheck_excludes.txt"
- ".github/workflows/golangci-lint.yml"
- ".golangci.yml"
pull_request:
paths:
- "go.sum"
- "go.mod"
- "**.go"
- "scripts/errcheck_excludes.txt"
- ".github/workflows/golangci-lint.yml"
- ".golangci.yml"

jobs:
golangci:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '>=1.20.2'
go-version: '>=1.22'
cache: true

- name: Install dependencies
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ on:
- "go.mod"
- "**.go"
- ".github/workflows/test.yml"
pull_request:
paths:
- "go.sum"
- "go.mod"
- "**.go"
- ".github/workflows/test.yml"

jobs:
test:
Expand All @@ -23,7 +17,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '^1.20'
go-version: '^1.22'

- name: Test
run: go test ./...
4 changes: 3 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
run:
modules-download-mode: readonly
skip-dirs:

issues:
exclude-dirs:
- vendor

linters:
Expand Down
4 changes: 2 additions & 2 deletions ttn_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ func NewExporter(uri string, apiKey string, sslVerify bool, timeout time.Duratio
if !strings.HasPrefix(uri, "https://") && !strings.HasPrefix(uri, "http://") {
return nil, errors.New("invalid URI scheme")
}
/* #nosec G402 -- allow insecure TLS when requested by user */

return &Exporter{
URI: uri,
apiKey: apiKey,
client: &http.Client{
Timeout: timeout,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: !sslVerify,
InsecureSkipVerify: !sslVerify, // #nosec G402 -- allow insecure TLS when requested by user
},
},
},
Expand Down

0 comments on commit 2d37404

Please sign in to comment.