From 23f69d531a7b56c943cb92f4681cc76eff54ac1e Mon Sep 17 00:00:00 2001 From: Shevchenko Alexey Date: Sat, 6 Apr 2024 17:12:26 +0300 Subject: [PATCH] x/net v0.22.0 => x/net v0.24.0 --- .golangci.yml | 5 ++--- .goreleaser.yml | 8 ++++---- go.mod | 2 +- go.sum | 4 ++-- internal/crawler/util_test.go | 8 ++------ internal/links/clean_test.go | 4 +--- internal/links/html_test.go | 12 +++--------- 7 files changed, 15 insertions(+), 28 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 955705b..ae70df3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,9 +1,8 @@ run: allow-parallel-runners: true - go: '1.21' + go: '1.22' output: - format: 'colored-line-number' print-issued-lines: true print-linter-name: true sort-results: true @@ -25,6 +24,7 @@ linters: - varnamelen - interfacer - scopelint + - intrange - deadcode - maligned - varcheck @@ -39,7 +39,6 @@ linters-settings: errcheck: check-type-assertions: true govet: - check-shadowing: true enable-all: true cyclop: max-complexity: 15 diff --git a/.goreleaser.yml b/.goreleaser.yml index fe5f51f..7ec5bf6 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -34,11 +34,11 @@ archives: - crawley-bin name_template: >- {{ .ProjectName }}_ + {{- .Tag }}_ {{- .Os }}_ {{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 - {{- else }}{{ .Arch }}{{ end }}_ - {{- .Tag }} + {{- else }}{{ .Arch }}{{ end }} format_overrides: - goos: windows format: zip @@ -47,8 +47,8 @@ nfpms: - id: packages file_name_template: >- {{ .ProjectName }}_ - {{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}_ - {{ .Tag }} + {{- .Tag }}_ + {{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }} homepage: https://github.com/s0rg/crawley description: Unix-way web crawler, written in Golang. maintainer: s0rg diff --git a/go.mod b/go.mod index e81e152..7c32fa1 100644 --- a/go.mod +++ b/go.mod @@ -6,5 +6,5 @@ require ( github.com/s0rg/compflag v1.1.0 github.com/s0rg/set v1.2.0 github.com/tdewolff/parse/v2 v2.7.12 - golang.org/x/net v0.22.0 + golang.org/x/net v0.24.0 ) diff --git a/go.sum b/go.sum index 5a11332..3937fe5 100644 --- a/go.sum +++ b/go.sum @@ -6,5 +6,5 @@ github.com/tdewolff/parse/v2 v2.7.12 h1:tgavkHc2ZDEQVKy1oWxwIyh5bP4F5fEh/JmBwPP/ github.com/tdewolff/parse/v2 v2.7.12/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA= github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52 h1:gAQliwn+zJrkjAHVcBEYW/RFvd2St4yYimisvozAYlA= github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= diff --git a/internal/crawler/util_test.go b/internal/crawler/util_test.go index c2ff95a..6c3e8c7 100644 --- a/internal/crawler/util_test.go +++ b/internal/crawler/util_test.go @@ -84,9 +84,7 @@ func TestRelativeDepth(t *testing.T) { t.Parallel() - for _, tt := range tests { - tc := tt - + for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { t.Parallel() @@ -150,9 +148,7 @@ func TestCanCrawl(t *testing.T) { {"url3-3", args{b: base, u: url3, d: 0}, false}, } - for _, tt := range tests { - tc := tt - + for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { t.Parallel() diff --git a/internal/links/clean_test.go b/internal/links/clean_test.go index 5e41430..8860476 100644 --- a/internal/links/clean_test.go +++ b/internal/links/clean_test.go @@ -34,9 +34,7 @@ func TestClean(t *testing.T) { {"result-api", args{b: testBase, r: "/api/v1/user"}, testRes4, true}, } - for _, tt := range tests { - tc := tt - + for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { t.Parallel() diff --git a/internal/links/html_test.go b/internal/links/html_test.go index bfafaf5..0c8c67b 100644 --- a/internal/links/html_test.go +++ b/internal/links/html_test.go @@ -41,9 +41,7 @@ func TestExtractTag(t *testing.T) { {name: "bad", args: args{b: testBase, t: &tBAD, k: "a"}, wantU: ""}, } - for _, tt := range tests { - tc := tt - + for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { t.Parallel() @@ -196,9 +194,7 @@ func TestExtractToken(t *testing.T) { }, } - for _, tt := range tests { - tc := tt - + for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { t.Parallel() @@ -316,9 +312,7 @@ func TestExtractURLS(t *testing.T) { }, } - for _, tt := range tests { - tc := tt - + for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { t.Parallel()