Skip to content

Commit

Permalink
rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperphoton committed Jan 17, 2022
1 parent 6f9bd9d commit d9def5a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The `Register` function takes a map, the key is the **original table name** and
## Usage Example

```go
sharding := gormsharding.Register(map[string]gormsharding.Resolver{
middleware := sharding.Register(map[string]sharding.Resolver{
"orders": {
EnableFullTable: true,
ShardingColumn: "user_id",
Expand All @@ -49,7 +49,7 @@ sharding := gormsharding.Register(map[string]gormsharding.Resolver{
}
},
})
db.Use(sharding)
db.Use(middleware)
```

## Config description
Expand Down
4 changes: 2 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ go get -u github.com/longbridgeapp/gorm-sharding
## 用法示例

```go
sharding := gormsharding.Register(map[string]gormsharding.Resolver{
middleware := sharding.Register(map[string]sharding.Resolver{
"orders": {
EnableFullTable: true,
ShardingColumn: "user_id",
Expand All @@ -45,7 +45,7 @@ sharding := gormsharding.Register(map[string]gormsharding.Resolver{
}
},
})
db.Use(sharding)
db.Use(middleware)
```

## 配置描述
Expand Down
2 changes: 1 addition & 1 deletion conn_pool.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gormsharding
package sharding

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion sharding.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gormsharding
package sharding

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion sharding_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gormsharding
package sharding

import (
"fmt"
Expand Down

0 comments on commit d9def5a

Please sign in to comment.