Skip to content

Commit

Permalink
Merge pull request #37 from navidys/golangci_lint
Browse files Browse the repository at this point in the history
golangci-lint update 1.56.2
  • Loading branch information
navidys committed Mar 5, 2024
2 parents 01c4d7d + fc64795 commit 16db49d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ install.tools: .install.pre-commit .install.codespell .install.golangci-lint .in

.PHONY: .install.golangci-lint
.install.golangci-lint:
VERSION=1.51.1 ./hack/install_golangci.sh
VERSION=1.56.2 ./hack/install_golangci.sh

.PHONY: .install.sphinx-build
.install.sphinx-build:
Expand Down
2 changes: 1 addition & 1 deletion connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func NewConnection(ctx context.Context, username string, password string) (conte
connection.auth = base64.StdEncoding.EncodeToString([]byte(username + ":" + password))
}

dialContext := func(ctx context.Context, _, _ string) (net.Conn, error) {
dialContext := func(ctx context.Context, _, _ string) (net.Conn, error) { //nolint:revive
return net.Dial("tcp", _url.Host) //nolint:wrapcheck
}

Expand Down
4 changes: 2 additions & 2 deletions flights.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ func GetFlightsByAircraft(ctx context.Context, icao24 string, begin int64, end i
func getFlightsRequestParams(airport string, aircraft string, begin int64, end int64) url.Values {
requestParams := make(url.Values)
if begin >= 0 {
requestParams.Add("begin", fmt.Sprintf("%d", begin))
requestParams.Add("begin", fmt.Sprintf("%d", begin)) //nolint:perfsprint
}

if end >= 0 {
requestParams.Add("end", fmt.Sprintf("%d", end))
requestParams.Add("end", fmt.Sprintf("%d", end)) //nolint:perfsprint
}

if aircraft != "" {
Expand Down
2 changes: 1 addition & 1 deletion states.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func GetStates(ctx context.Context, time int64, icao24 []string,
func getStateRequestParams(time int64, icao24 []string, bBox *BoundingBoxOptions, extended bool) url.Values {
requestParams := make(url.Values)
if time > 0 {
requestParams.Add("time", fmt.Sprintf("%d", time))
requestParams.Add("time", fmt.Sprintf("%d", time)) //nolint:perfsprint
}

for _, icao24Item := range icao24 {
Expand Down
2 changes: 1 addition & 1 deletion tracks.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func decodeWaypoint(data []interface{}) (*WayPoint, error) { //nolint:funlen,cyc
func getTracksRequestParams(time int64, icao24 string) url.Values {
requestParams := make(url.Values)
if time >= 0 {
requestParams.Add("time", fmt.Sprintf("%d", time))
requestParams.Add("time", fmt.Sprintf("%d", time)) //nolint:perfsprint
}

if icao24 != "" {
Expand Down

0 comments on commit 16db49d

Please sign in to comment.