Skip to content

Commit

Permalink
chore: introduce lint (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
varnastadeus authored Dec 9, 2022
1 parent 88c7c50 commit e925158
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: golangci-lint
on:
pull_request:
permissions:
contents: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m
6 changes: 2 additions & 4 deletions castai/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package castai
import (
"context"
"fmt"
"net/http"
"time"

"github.com/go-resty/resty/v2"
Expand Down Expand Up @@ -32,8 +31,8 @@ func NewDefaultClient(url, key string, level logrus.Level, timeout time.Duration
client := resty.New()
client.SetHostURL(url)
client.SetTimeout(timeout)
client.Header.Set(http.CanonicalHeaderKey(headerAPIKey), key)
client.Header.Set(http.CanonicalHeaderKey(headerUserAgent), "castai-spot-handler/"+version)
client.Header.Set(headerAPIKey, key)
client.Header.Set(headerUserAgent, "castai-spot-handler/"+version)
if level == logrus.TraceLevel {
client.SetDebug(true)
}
Expand All @@ -45,7 +44,6 @@ type client struct {
log *logrus.Logger
rest *resty.Client
clusterID string
nodeID string
}

type CloudEventRequest struct {
Expand Down

0 comments on commit e925158

Please sign in to comment.