Skip to content

Commit b093d38

Browse files
committed
refactor: rename function
1 parent 3452d4f commit b093d38

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

examples/create_mysql_storage_from_dsn/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func main() {
1313
connectionManager := mysql_storage.NewMysqlConnectionManagerFromDsn(testDsn)
1414

1515
// 然后从这个ConnectionManager创建MySQL Storage
16-
options := mysql_storage.NewMySQLStorageOptions().SetConnectionManager(connectionManager)
16+
options := mysql_storage.NewMysqlStorageOptions().SetConnectionManager(connectionManager)
1717
storage, err := mysql_storage.NewMysqlStorage(context.Background(), options)
1818
if err != nil {
1919
panic(err)

examples/create_mysql_storage_from_service_properties/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func main() {
1717
connectionManager := mysql_storage.NewMysqlConnectionManager(host, port, username, passwd, database)
1818

1919
// 然后从这个连接管理器创建MySQL Storage
20-
options := mysql_storage.NewMySQLStorageOptions().SetConnectionManager(connectionManager)
20+
options := mysql_storage.NewMysqlStorageOptions().SetConnectionManager(connectionManager)
2121
storage, err := mysql_storage.NewMysqlStorage(context.Background(), options)
2222
if err != nil {
2323
panic(err)

examples/create_mysql_storage_from_sqldb/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func main() {
1919

2020
// 则可以从这个*sql.DB中创建一个MySQL Storage
2121
connectionManager := storage.NewFixedSqlDBConnectionManager(db)
22-
options := mysql_storage.NewMySQLStorageOptions().SetConnectionManager(connectionManager)
22+
options := mysql_storage.NewMysqlStorageOptions().SetConnectionManager(connectionManager)
2323
storage, err := mysql_storage.NewMysqlStorage(context.Background(), options)
2424
if err != nil {
2525
panic(err)

mysql_storage_options.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type MysqlStorageOptions struct {
1515
ConnectionManager storage.ConnectionManager[*sql.DB]
1616
}
1717

18-
func NewMySQLStorageOptions() *MysqlStorageOptions {
18+
func NewMysqlStorageOptions() *MysqlStorageOptions {
1919
return &MysqlStorageOptions{
2020
TableName: storage.DefaultStorageTableName,
2121
}

mysql_storage_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"testing"
1010
)
1111

12-
func TestNewMySQLStorage(t *testing.T) {
12+
func TestNewMysqlStorage(t *testing.T) {
1313
envName := "STORAGE_LOCK_MYSQL_DSN"
1414
dsn := os.Getenv(envName)
1515
assert.NotEmpty(t, dsn)

0 commit comments

Comments
 (0)