Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename module #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
1. Start the seata-server service with the docker file under the /dockercomposer folder

```shell
git clone https://github.com/seata/seata-go-samples.git
git clone https://github.com/apache/seata-go-samples.git
```

```shell
Expand Down Expand Up @@ -46,8 +46,8 @@ System Env Supported:
original dependency path.

```
//github.com/seata/seata-go v1.0.3
github.com/seata/seata-go v0.0.0-incompatibl
//github.com/apache/seata-go v1.0.3
github.com/apache/seata-go v0.0.0-incompatibl
```

2. Find the absolute or relative path to your local code.
Expand All @@ -60,7 +60,7 @@ System Env Supported:
3. Add the replace module to the go.mod file and change it to the local code path.

```
github.com/seata/seata-go => ../seata-go
github.com/apache/seata-go => ../seata-go
```

4. Synchronization dependencies.
Expand All @@ -73,7 +73,7 @@ System Env Supported:

## How to use go workspace to test samples for new PR (Recommended)

You can use your local project forked to test new pr that haven't merged into github.com/seata/seata-go.
You can use your local project forked to test new pr that haven't merged into github.com/apache/seata-go.

1. Make sure your go version is 1.18 or later.

Expand Down
2 changes: 1 addition & 1 deletion at/basic/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"time"

"github.com/seata/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/tm"
)

func insertData(ctx context.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion at/basic/insert_on_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"time"

"github.com/seata/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/tm"
)

func insertOnUpdateData(ctx context.Context) error {
Expand Down
4 changes: 2 additions & 2 deletions at/basic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"fmt"
"time"

"github.com/seata/seata-go-samples/util"
"github.com/seata/seata-go/pkg/client"
"github.com/apache/seata-go-samples/util"
"github.com/apache/seata-go/pkg/client"
)

var db *sql.DB
Expand Down
2 changes: 1 addition & 1 deletion at/basic/select_for_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"time"

"github.com/seata/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/tm"
)

func selectForUpdateData(ctx context.Context) error {
Expand Down
6 changes: 3 additions & 3 deletions at/gin/client/insert_on_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"net/http"
"time"

"github.com/apache/seata-go/pkg/constant"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
"github.com/parnurzeal/gorequest"
"github.com/seata/seata-go/pkg/constant"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
)

func insertOnUpdateData(ctx context.Context) (re error) {
Expand Down
2 changes: 1 addition & 1 deletion at/gin/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"flag"
"time"

"github.com/seata/seata-go/pkg/client"
"github.com/apache/seata-go/pkg/client"
)

var serverIpPort = "http://127.0.0.1:8080"
Expand Down
6 changes: 3 additions & 3 deletions at/gin/client/select_for_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"net/http"
"time"

"github.com/apache/seata-go/pkg/constant"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
"github.com/parnurzeal/gorequest"
"github.com/seata/seata-go/pkg/constant"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
)

func selectForUpdate(ctx context.Context) (re error) {
Expand Down
6 changes: 3 additions & 3 deletions at/gin/client/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"net/http"
"time"

"github.com/apache/seata-go/pkg/constant"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
"github.com/parnurzeal/gorequest"
"github.com/seata/seata-go/pkg/constant"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
)

func updateData(ctx context.Context) (re error) {
Expand Down
8 changes: 4 additions & 4 deletions at/gin/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"database/sql"
"net/http"

"github.com/apache/seata-go-samples/util"
"github.com/apache/seata-go/pkg/client"
ginmiddleware "github.com/apache/seata-go/pkg/integration/gin"
"github.com/apache/seata-go/pkg/util/log"
"github.com/gin-gonic/gin"
"github.com/seata/seata-go-samples/util"
"github.com/seata/seata-go/pkg/client"
ginmiddleware "github.com/seata/seata-go/pkg/integration/gin"
"github.com/seata/seata-go/pkg/util/log"
)

var db *sql.DB
Expand Down
6 changes: 3 additions & 3 deletions at/gorm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"database/sql"
"time"

"github.com/seata/seata-go/pkg/client"
sql2 "github.com/seata/seata-go/pkg/datasource/sql"
"github.com/seata/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/client"
sql2 "github.com/apache/seata-go/pkg/datasource/sql"
"github.com/apache/seata-go/pkg/tm"
"gorm.io/driver/mysql"
"gorm.io/gorm"
)
Expand Down
4 changes: 2 additions & 2 deletions at/non_transaction/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"fmt"
"time"

"github.com/seata/seata-go-samples/util"
"github.com/seata/seata-go/pkg/client"
"github.com/apache/seata-go-samples/util"
"github.com/apache/seata-go/pkg/client"
)

type OrderTbl struct {
Expand Down
6 changes: 3 additions & 3 deletions at/rollback/client/insert_on_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"net/http"
"time"

"github.com/apache/seata-go/pkg/constant"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
"github.com/parnurzeal/gorequest"
"github.com/seata/seata-go/pkg/constant"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
)

func insertOnUpdateData(ctx context.Context) (re error) {
Expand Down
2 changes: 1 addition & 1 deletion at/rollback/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"flag"
"time"

"github.com/seata/seata-go/pkg/client"
"github.com/apache/seata-go/pkg/client"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions at/rollback/client/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"net/http"
"time"

"github.com/apache/seata-go/pkg/constant"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
"github.com/parnurzeal/gorequest"
"github.com/seata/seata-go/pkg/constant"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
)

func updateData(ctx context.Context) (re error) {
Expand Down
8 changes: 4 additions & 4 deletions at/rollback/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"database/sql"
"net/http"

"github.com/apache/seata-go-samples/util"
"github.com/apache/seata-go/pkg/client"
ginmiddleware "github.com/apache/seata-go/pkg/integration/gin"
"github.com/apache/seata-go/pkg/util/log"
"github.com/gin-gonic/gin"
"github.com/seata/seata-go-samples/util"
"github.com/seata/seata-go/pkg/client"
ginmiddleware "github.com/seata/seata-go/pkg/integration/gin"
"github.com/seata/seata-go/pkg/util/log"
)

var db *sql.DB
Expand Down
8 changes: 4 additions & 4 deletions at/rollback/server2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"database/sql"
"net/http"

"github.com/apache/seata-go-samples/util"
"github.com/apache/seata-go/pkg/client"
ginmiddleware "github.com/apache/seata-go/pkg/integration/gin"
"github.com/apache/seata-go/pkg/util/log"
"github.com/gin-gonic/gin"
"github.com/seata/seata-go-samples/util"
"github.com/seata/seata-go/pkg/client"
ginmiddleware "github.com/seata/seata-go/pkg/integration/gin"
"github.com/seata/seata-go/pkg/util/log"
)

var db *sql.DB
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/seata/seata-go-samples
module github.com/apache/seata-go-samples

go 1.18

Expand All @@ -7,14 +7,14 @@ require (
github.com/gin-gonic/gin v1.8.0
github.com/go-sql-driver/mysql v1.7.0
github.com/parnurzeal/gorequest v0.2.16
github.com/seata/seata-go v1.2.0
github.com/apache/seata-go v1.2.0
google.golang.org/grpc v1.49.0
google.golang.org/protobuf v1.28.1
gorm.io/driver/mysql v1.4.5
gorm.io/gorm v1.24.3
)

// replace github.com/seata/seata-go v1.0.3 => ../seata-go
// replace github.com/apache/seata-go v1.0.3 => ../seata-go

require (
cloud.google.com/go v0.93.3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,8 @@ github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b h1:gQZ0qzfKHQIybLANtM3mBXNUtOfsCFXeTsnBqCsx1KM=
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/seata/seata-go v1.2.0 h1:AQ5a/9GoSZSj/s/xgAoIo/ABIpkQ86SkJzC54tmhL4w=
github.com/seata/seata-go v1.2.0/go.mod h1:Db7aw/CAmyJBsyBBeRiNBAVTtG/9rfyrxdbLz0pKTWY=
github.com/apache/seata-go v1.2.0 h1:AQ5a/9GoSZSj/s/xgAoIo/ABIpkQ86SkJzC54tmhL4w=
github.com/apache/seata-go v1.2.0/go.mod h1:Db7aw/CAmyJBsyBBeRiNBAVTtG/9rfyrxdbLz0pKTWY=
github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shirou/gopsutil/v3 v3.21.6/go.mod h1:JfVbDpIBLVzT8oKbvMg9P3wEIMDDpVn+LwHTKj0ST88=
github.com/shirou/gopsutil/v3 v3.22.2 h1:wCrArWFkHYIdDxx/FSfF5RB4dpJYW6t7rcp3+zL8uks=
Expand Down
6 changes: 3 additions & 3 deletions integrate_test/at/insert/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"fmt"
"time"

"github.com/seata/seata-go/pkg/client"
sql2 "github.com/seata/seata-go/pkg/datasource/sql"
"github.com/seata/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/client"
sql2 "github.com/apache/seata-go/pkg/datasource/sql"
"github.com/apache/seata-go/pkg/tm"
"gorm.io/driver/mysql"
"gorm.io/gorm"
)
Expand Down
8 changes: 4 additions & 4 deletions tcc/dubbo/client/cmd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"dubbo.apache.org/dubbo-go/v3/config"
_ "dubbo.apache.org/dubbo-go/v3/imports"

"github.com/seata/seata-go-samples/tcc/dubbo/client/service"
"github.com/seata/seata-go/pkg/client"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go-samples/tcc/dubbo/client/service"
"github.com/apache/seata-go/pkg/client"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
)

// need to setup environment variable "DUBBO_GO_CONFIG_PATH" to "conf/dubbogo.yml" before run
Expand Down
2 changes: 1 addition & 1 deletion tcc/dubbo/client/service/user_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"context"
"fmt"

"github.com/seata/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/tm"
)

var UserProviderInstance = NewTwoPhaseDemoService()
Expand Down
8 changes: 4 additions & 4 deletions tcc/dubbo/server/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
"dubbo.apache.org/dubbo-go/v3/config"
_ "dubbo.apache.org/dubbo-go/v3/imports"

"github.com/seata/seata-go-samples/tcc/dubbo/server/service"
"github.com/seata/seata-go/pkg/client"
"github.com/seata/seata-go/pkg/rm/tcc"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go-samples/tcc/dubbo/server/service"
"github.com/apache/seata-go/pkg/client"
"github.com/apache/seata-go/pkg/rm/tcc"
"github.com/apache/seata-go/pkg/util/log"
)

// need to setup environment variable "DUBBO_GO_CONFIG_PATH" to "conf/dubbogo.yml" before run
Expand Down
4 changes: 2 additions & 2 deletions tcc/dubbo/server/service/user_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ package service
import (
"context"

"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
)

type UserProvider struct{}
Expand Down
8 changes: 4 additions & 4 deletions tcc/fence/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ package main
import (
"context"

"github.com/apache/seata-go/pkg/client"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
_ "github.com/go-sql-driver/mysql"
"github.com/seata/seata-go/pkg/client"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"

"github.com/seata/seata-go-samples/tcc/fence/service"
"github.com/apache/seata-go-samples/tcc/fence/service"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions tcc/fence/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"fmt"
"sync"

"github.com/seata/seata-go/pkg/rm/tcc"
"github.com/seata/seata-go/pkg/rm/tcc/fence"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go/pkg/rm/tcc"
"github.com/apache/seata-go/pkg/rm/tcc/fence"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions tcc/gin/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (

"github.com/parnurzeal/gorequest"

"github.com/seata/seata-go/pkg/client"
"github.com/seata/seata-go/pkg/constant"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go/pkg/client"
"github.com/apache/seata-go/pkg/constant"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions tcc/gin/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (

"github.com/gin-gonic/gin"

"github.com/seata/seata-go/pkg/client"
ginmiddleware "github.com/seata/seata-go/pkg/integration/gin"
"github.com/seata/seata-go/pkg/rm/tcc"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go/pkg/client"
ginmiddleware "github.com/apache/seata-go/pkg/integration/gin"
"github.com/apache/seata-go/pkg/rm/tcc"
"github.com/apache/seata-go/pkg/util/log"
)

func main() {
Expand Down
Loading