Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Sep 4, 2024
1 parent 7dfe6db commit a82d4ac
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ on:
paths-ignore:
- "**/*.md"
permissions:
# contents permission to update benchmark data
contents: write
# allow posting comments to pull request
pull-requests: write
jobs:
benchmark:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/mockery.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Mockery
on:
pull_request:
permissions: write-all
permissions:
contents: write
pull-requests: write
jobs:
mockery:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions session/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func NewManager(config config.Config, json foundation.Json) *Manager {
},
},
}
manager.extendDefaultDriver()
manager.extendDefaultDrivers()
return manager
}

Expand Down Expand Up @@ -91,9 +91,9 @@ func (m *Manager) getDefaultDriver() string {
return m.config.GetString("session.driver")
}

func (m *Manager) extendDefaultDriver() {
func (m *Manager) extendDefaultDrivers() {
if _, err := m.Extend("file", m.createFileDriver); err != nil {
panic(fmt.Sprintf("failed to extend session manager: %v", err))
panic(fmt.Sprintf("failed to extend session file driver: %v", err))
}
}

Expand Down
6 changes: 3 additions & 3 deletions session/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package session

import (
"fmt"
"github.com/goravel/framework/support/str"
"os"
"testing"

Expand All @@ -12,6 +11,7 @@ import (
sessioncontract "github.com/goravel/framework/contracts/session"
"github.com/goravel/framework/foundation/json"
mockconfig "github.com/goravel/framework/mocks/config"
"github.com/goravel/framework/support/str"
)

type ManagerTestSuite struct {
Expand Down Expand Up @@ -55,7 +55,7 @@ func (s *ManagerTestSuite) TestDriver() {

// provide custom driver
s.mockConfig.On("GetInt", "session.gc_interval", 30).Return(30).Once()
manager, err := s.manager.Extend("test", NewCustomDriver())
manager, err := s.manager.Extend("test", NewCustomDriver)
s.Nil(err)
s.NotNil(manager)
driver, err = s.manager.Driver("test")
Expand All @@ -80,7 +80,7 @@ func (s *ManagerTestSuite) TestDriver() {

func (s *ManagerTestSuite) TestExtend() {
s.mockConfig.On("GetInt", "session.gc_interval", 30).Return(30).Once()
manager, err := s.manager.Extend("test", NewCustomDriver())
manager, err := s.manager.Extend("test", NewCustomDriver)
s.Nil(err)
s.NotNil(manager)
driver, err := s.manager.Driver("test")
Expand Down
4 changes: 2 additions & 2 deletions support/file/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"os"
"testing"

"github.com/goravel/framework/testing/file"

"github.com/stretchr/testify/assert"

"github.com/goravel/framework/testing/file"
)

func TestClientOriginalExtension(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions validation/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package validation
import (
"testing"

httpvalidate "github.com/goravel/framework/contracts/validation"

"github.com/stretchr/testify/assert"

httpvalidate "github.com/goravel/framework/contracts/validation"
)

func TestOne(t *testing.T) {
Expand Down

0 comments on commit a82d4ac

Please sign in to comment.