Skip to content

Commit

Permalink
Upgrade go version
Browse files Browse the repository at this point in the history
  • Loading branch information
maranqz committed Nov 9, 2024
1 parent 4000c8b commit 4deedbf
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
branches: [ main ]

env:
GO_VERSION: ^1.20
GOLANGCI_LINT_VERSION: v1.54.0
GO_VERSION: 1.23
GOLANGCI_LINT_VERSION: v1.61.0

jobs:
lint:
Expand Down
18 changes: 2 additions & 16 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,17 @@ linters-settings:
ignore-names:
- v
- ok
gci:
local-prefixes: github.com/maranqz/gofactory

linters:
enable-all: true
disable:
- maligned
- deadcode
- golint
- scopelint
- varcheck
- structcheck
- nosnakecase
- exhaustivestruct
- ifshort
- exhaustruct
- depguard
- interfacer
- thelper

run:
skip-dirs:
- testdata

issues:
exclude-dirs:
- testdata
exclude-rules:
- path: lint_test
linters:
Expand Down
3 changes: 1 addition & 2 deletions cmd/gofactory/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package main

import (
"golang.org/x/tools/go/analysis/singlechecker"

"github.com/maranqz/gofactory"
"golang.org/x/tools/go/analysis/singlechecker"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maranqz/gofactory

go 1.20
go 1.23

require (
github.com/gobwas/glob v0.2.3
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
Expand Down
9 changes: 3 additions & 6 deletions lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import (
"path/filepath"
"testing"

"github.com/maranqz/gofactory"
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/go/analysis/analysistest"

"github.com/maranqz/gofactory"
)

func TestLinterSuite(t *testing.T) {
Expand All @@ -24,13 +23,13 @@ func TestLinterSuite(t *testing.T) {
"generic": {pkgs: []string{"generic/..."}},
"packageGlobs": {
pkgs: []string{"packageGlobs/..."},
prepare: func(t *testing.T, a *analysis.Analyzer) error {
prepare: func(_ *testing.T, a *analysis.Analyzer) error {
return a.Flags.Set("packageGlobs", "factory/packageGlobs/blocked/**")
},
},
"packageGlobsOnly": {
pkgs: []string{"packageGlobsOnly/main/..."},
prepare: func(t *testing.T, a *analysis.Analyzer) error {
prepare: func(_ *testing.T, a *analysis.Analyzer) error {
if err := a.Flags.Set("packageGlobs", "factory/packageGlobsOnly/blocked/**"); err != nil {
return err
}
Expand All @@ -40,8 +39,6 @@ func TestLinterSuite(t *testing.T) {
},
}
for name, tt := range tests {
tt := tt

t.Run(name, func(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit 4deedbf

Please sign in to comment.