Skip to content

Commit

Permalink
fix(auth): renamed NewAuth with New
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlangzi committed Apr 12, 2024
1 parent 6ca454f commit 023d162
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ type Auth struct {
genAuditLog *shardid.Generator
}

// NewAuth create an auth provider with db and options
// New create an auth provider with db and options
// skipcq: GO-R1005
func NewAuth(db *sqle.DB, options ...Option) *Auth {
func New(db *sqle.DB, options ...Option) *Auth {
a := &Auth{
db: db,
}
Expand Down
2 changes: 1 addition & 1 deletion auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func createAuthTest(file string) *Auth {

// dbTest.SetMaxOpenConns(1)

authTest := NewAuth(dbTest,
authTest := New(dbTest,
WithPrefix("test_"),
WithJWT("jwt"),
WithAES("aes"),
Expand Down

0 comments on commit 023d162

Please sign in to comment.