Skip to content

Commit

Permalink
chore: update CI, dependencies, and linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Feb 9, 2024
1 parent 801ea79 commit 51341a1
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
env:
GO_VERSION: stable
GOLANGCI_LINT_VERSION: v1.55.1
GOLANGCI_LINT_VERSION: v1.56.1
CGO_ENABLED: 0

steps:
Expand All @@ -26,7 +26,7 @@ jobs:

# https://github.com/marketplace/actions/setup-go-environment
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

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

# https://github.com/marketplace/actions/setup-go-environment
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ linters:

issues:
exclude-use-default: false
max-per-linter: 0
max-issues-per-linter: 0
max-same-issues: 0
exclude: []
exclude-rules:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/stretchr/testify v1.8.4
golang.org/x/mod v0.13.0
golang.org/x/mod v0.15.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
4 changes: 2 additions & 2 deletions goproxy/auth.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package goproxy

import (
"fmt"
"errors"
"net/http"
"time"
)
Expand All @@ -19,7 +19,7 @@ type BasicAuthTransport struct {
// NewBasicAuthTransport Creates a new BasicAuthTransport.
func NewBasicAuthTransport(username, password string) (*BasicAuthTransport, error) {
if username == "" || password == "" {
return nil, fmt.Errorf("credentials missing")
return nil, errors.New("credentials missing")
}

return &BasicAuthTransport{username: username, password: password}, nil
Expand Down
3 changes: 1 addition & 2 deletions goproxy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import (
const defaultProxyURL = "https://proxy.golang.org"

// VersionInfo is the representation of a version.
//
//nolint:musttag // data from Go proxy.
type VersionInfo struct {
Name string
Short string
Expand Down Expand Up @@ -165,6 +163,7 @@ func (c *Client) getInfo(uri string) (*VersionInfo, error) {
}

info := VersionInfo{}
//nolint:musttag // data from Go proxy.
err = json.NewDecoder(resp.Body).Decode(&info)
if err != nil {
return nil, err
Expand Down

0 comments on commit 51341a1

Please sign in to comment.