Skip to content

Commit 453021d

Browse files
committed
fix: golang-ci-lint version + lint errors
1 parent fd43b3a commit 453021d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ REFLEX=$(GOPATH)/bin/reflex
3535
$(REFLEX):
3636
go install github.com/cespare/reflex@latest
3737

38-
GOLANGCILINTVERSION:=1.32.0
38+
GOLANGCILINTVERSION:=1.54.2
3939
GOLANGCILINT=$(GOPATH)/bin/golangci-lint
4040
$(GOLANGCILINT):
4141
curl -fsSL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v$(GOLANGCILINTVERSION)

server/services/persistence.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ func (p *persistence) StoreSessions(sessions types.Sessions) {
110110
}
111111
var sessionsGroup errgroup.Group
112112
for _, session := range sessions {
113+
session := session
113114
sessionsGroup.Go(func() error {
114115
if err := p.createSessionDirectory(session.ID); err != nil {
115116
return err
@@ -161,6 +162,7 @@ func (p *persistence) LoadSessions() (types.Sessions, error) {
161162
var sessionsGroup errgroup.Group
162163
var sessionsLock sync.Mutex
163164
for _, session := range sessions {
165+
session := session
164166
sessionsGroup.Go(func() error {
165167
historyFile, err := os.Open(filepath.Join(p.persistenceDirectory, session.ID, historyFileName))
166168
if err != nil {
@@ -235,7 +237,6 @@ func (p *persistence) persistHistory(sessionID string, h types.History) error {
235237
}
236238

237239
func (p *persistence) persistMocks(sessionID string, m types.Mocks) error {
238-
239240
// we need to reverse mocks before storage in order to have a reusable mocks file as mocks are stored as a stack
240241
orderedMocks := make(types.Mocks, 0, len(m))
241242
for i := len(m) - 1; i >= 0; i-- {

0 commit comments

Comments
 (0)