Skip to content

Commit

Permalink
Merge pull request #199 from go-pkgz/paskal/update_modules
Browse files Browse the repository at this point in the history
Update go modules, CI actions, fix golangci-lint errors
  • Loading branch information
umputun authored Mar 22, 2024
2 parents 92fa431 + 35ea494 commit d60c4b1
Show file tree
Hide file tree
Showing 14 changed files with 142 additions and 138 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
sudo systemctl disable mono-xsp4.service || true
- name: set up go 1.21
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
id: go
Expand All @@ -28,7 +28,7 @@ jobs:
mongoDBVersion: "6.0"

- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: build the example
working-directory: _example
Expand All @@ -46,12 +46,12 @@ jobs:
ENABLE_MONGO_TESTS: "true"

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: latest

- name: golangci-lint on example directory
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: latest
args: --config ../.golangci.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
6 changes: 6 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,10 @@ issues:
- text: 'Deferring unsafe method "Close" on type "io.ReadCloser"'
linters:
- gosec
- linters:
- unparam
- unused
- revive
path: _test\.go$
text: "unused-parameter"
exclude-use-default: false
32 changes: 16 additions & 16 deletions _example/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ go 1.21
replace github.com/go-pkgz/auth => ../

require (
github.com/go-chi/chi/v5 v5.0.10
github.com/go-chi/chi/v5 v5.0.12
github.com/go-oauth2/oauth2/v4 v4.5.2
github.com/go-pkgz/auth v1.22.0
github.com/go-pkgz/lgr v0.11.1
github.com/go-pkgz/rest v1.18.2
github.com/go-pkgz/rest v1.19.0
github.com/golang-jwt/jwt v3.2.2+incompatible
golang.org/x/oauth2 v0.15.0
golang.org/x/oauth2 v0.18.0
)

require (
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute v1.25.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/dghubble/oauth1 v0.7.2 // indirect
github.com/dghubble/oauth1 v0.7.3 // indirect
github.com/go-pkgz/repeater v1.1.3 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/rrivera/identicon v0.0.0-20240116195454-d5ba35832c0d // indirect
github.com/tidwall/btree v1.7.0 // indirect
github.com/tidwall/buntdb v1.3.0 // indirect
github.com/tidwall/gjson v1.17.0 // indirect
github.com/tidwall/gjson v1.17.1 // indirect
github.com/tidwall/grect v0.1.4 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
Expand All @@ -37,13 +37,13 @@ require (
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
go.etcd.io/bbolt v1.3.8 // indirect
go.mongodb.org/mongo-driver v1.13.1 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/image v0.14.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
go.etcd.io/bbolt v1.3.9 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/image v0.15.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
)
79 changes: 36 additions & 43 deletions _example/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func initGoauth2Srv() *goauth2.Server {

srv := goauth2.NewServer(goauth2.NewConfig(), manager)

srv.SetUserAuthorizationHandler(func(w http.ResponseWriter, r *http.Request) (string, error) {
srv.SetUserAuthorizationHandler(func(_ http.ResponseWriter, r *http.Request) (string, error) {
if r.Form.Get("username") != "admin" || r.Form.Get("password") != "admin" {
return "", fmt.Errorf("wrong creds. Use: admin admin")
}
Expand Down
2 changes: 1 addition & 1 deletion avatar/localfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (fs *LocalFS) Remove(avatar string) error {
// note: id includes .image suffix
func (fs *LocalFS) List() (ids []string, err error) {
err = filepath.Walk(fs.storePath,
func(path string, info os.FileInfo, err error) error {
func(_ string, info os.FileInfo, err error) error {
if err != nil {
return err
}
Expand Down
42 changes: 21 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,45 @@ module github.com/go-pkgz/auth
go 1.21

require (
github.com/dghubble/oauth1 v0.7.2
github.com/dghubble/oauth1 v0.7.3
github.com/go-oauth2/oauth2/v4 v4.5.2
github.com/go-pkgz/email v0.5.0
github.com/go-pkgz/repeater v1.1.3
github.com/go-pkgz/rest v1.18.2
github.com/go-pkgz/rest v1.19.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/rrivera/identicon v0.0.0-20240116195454-d5ba35832c0d
github.com/stretchr/testify v1.8.4
go.etcd.io/bbolt v1.3.8
go.mongodb.org/mongo-driver v1.13.1
golang.org/x/image v0.14.0
golang.org/x/oauth2 v0.15.0
github.com/stretchr/testify v1.9.0
go.etcd.io/bbolt v1.3.9
go.mongodb.org/mongo-driver v1.14.0
golang.org/x/image v0.15.0
golang.org/x/oauth2 v0.18.0
)

require (
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute v1.25.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/tidwall/btree v0.0.0-20191029221954-400434d76274 // indirect
github.com/tidwall/buntdb v1.1.2 // indirect
github.com/tidwall/gjson v1.12.1 // indirect
github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb // indirect
github.com/tidwall/btree v1.7.0 // indirect
github.com/tidwall/buntdb v1.3.0 // indirect
github.com/tidwall/gjson v1.17.1 // indirect
github.com/tidwall/grect v0.1.4 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e // indirect
github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/rtred v0.1.2 // indirect
github.com/tidwall/tinyqueue v0.1.1 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.33.0 // indirect
Expand Down
Loading

0 comments on commit d60c4b1

Please sign in to comment.