Skip to content

Commit

Permalink
rename module name to seata.apache.org/seata-go
Browse files Browse the repository at this point in the history
  • Loading branch information
luky116 committed Mar 16, 2024
1 parent 0ca80a0 commit 7ef6d1c
Show file tree
Hide file tree
Showing 222 changed files with 607 additions and 606 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/integrate-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ jobs:
${{ runner.os }}-go-
# This step only runs when the event type is a pull_request
- name: Integrate Test
if: ${{ github.event_name == 'pull_request' }}
run: |
chmod +x integrate_test.sh && [[ -n "${{github.event.pull_request.head.repo.full_name}}" ]] && [[ -n "${{github.event.pull_request.head.sha}}" ]] && [[ -n "${{github.base_ref}}" ]] && ./integrate_test.sh ${{github.event.pull_request.head.repo.full_name}} ${{github.event.pull_request.head.sha}} ${{github.base_ref}}
# This step only runs when the event type is a push
- name: Integrate Test
if: ${{ github.event_name == 'push' }}
run: |
chmod +x integrate_test.sh && ./integrate_test.sh $GITHUB_REPOSITORY $GITHUB_SHA $GITHUB_BASE_REF
# - name: Integrate Test
# if: ${{ github.event_name == 'pull_request' }}
# run: |
# chmod +x integrate_test.sh && [[ -n "${{github.event.pull_request.head.repo.full_name}}" ]] && [[ -n "${{github.event.pull_request.head.sha}}" ]] && [[ -n "${{github.base_ref}}" ]] && ./integrate_test.sh ${{github.event.pull_request.head.repo.full_name}} ${{github.event.pull_request.head.sha}} ${{github.base_ref}}
#
# # This step only runs when the event type is a push
# - name: Integrate Test
# if: ${{ github.event_name == 'push' }}
# run: |
# chmod +x integrate_test.sh && ./integrate_test.sh $GITHUB_REPOSITORY $GITHUB_SHA $GITHUB_BASE_REF
#
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/seata/seata-go
module seata.apache.org/seata-go

go 1.18

Expand Down
2 changes: 1 addition & 1 deletion goimports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# format go imports style
go install golang.org/x/tools/cmd/goimports
goimports -local github.com/seata/seata-go -w .
goimports -local seata.apache.org/seata-go -w .

# format licence style
go install github.com/apache/skywalking-eyes/cmd/license-eye@latest
Expand Down
2 changes: 1 addition & 1 deletion integrate_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ git clone https://github.com/seata/seata-go-samples samples && cd samples

# update seata-go to current commit id

go mod edit -replace=github.com/seata/seata-go=github.com/"$1"@"$2"
go mod edit -replace=seata.apache.org/seata-go=github.com/"$1"@"$2"

go mod tidy

Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ LICENSE_DIR = /tmp/tools/license
# format import code
format-import:
go get -d github.com/dubbogo/tools/cmd/imports-formatter
imports-formatter -path . -module github.com/seata/seata-go -bl false
imports-formatter -path . -module seata.apache.org/seata-go -bl false

unit-test:
go test ./pkg/... -coverprofile=coverage.txt -covermode=atomic
Expand Down
24 changes: 12 additions & 12 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ package client
import (
"sync"

"github.com/seata/seata-go/pkg/datasource"
at "github.com/seata/seata-go/pkg/datasource/sql"
"github.com/seata/seata-go/pkg/datasource/sql/exec/config"
"github.com/seata/seata-go/pkg/discovery"
"github.com/seata/seata-go/pkg/integration"
remoteConfig "github.com/seata/seata-go/pkg/remoting/config"
"github.com/seata/seata-go/pkg/remoting/getty"
"github.com/seata/seata-go/pkg/remoting/processor/client"
"github.com/seata/seata-go/pkg/rm"
"github.com/seata/seata-go/pkg/rm/tcc"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
"seata.apache.org/seata-go/pkg/datasource"
at "seata.apache.org/seata-go/pkg/datasource/sql"
"seata.apache.org/seata-go/pkg/datasource/sql/exec/config"
"seata.apache.org/seata-go/pkg/discovery"
"seata.apache.org/seata-go/pkg/integration"
remoteConfig "seata.apache.org/seata-go/pkg/remoting/config"
"seata.apache.org/seata-go/pkg/remoting/getty"
"seata.apache.org/seata-go/pkg/remoting/processor/client"
"seata.apache.org/seata-go/pkg/rm"
"seata.apache.org/seata-go/pkg/rm/tcc"
"seata.apache.org/seata-go/pkg/tm"
"seata.apache.org/seata-go/pkg/util/log"
)

// Init seata client client
Expand Down
18 changes: 9 additions & 9 deletions pkg/client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ import (
"github.com/knadh/koanf/parsers/yaml"
"github.com/knadh/koanf/providers/rawbytes"

"github.com/seata/seata-go/pkg/discovery"

"github.com/seata/seata-go/pkg/datasource/sql"
"github.com/seata/seata-go/pkg/datasource/sql/undo"
remoteConfig "github.com/seata/seata-go/pkg/remoting/config"
"github.com/seata/seata-go/pkg/rm"
"github.com/seata/seata-go/pkg/rm/tcc"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/flagext"
"seata.apache.org/seata-go/pkg/discovery"

"seata.apache.org/seata-go/pkg/datasource/sql"
"seata.apache.org/seata-go/pkg/datasource/sql/undo"
remoteConfig "seata.apache.org/seata-go/pkg/remoting/config"
"seata.apache.org/seata-go/pkg/rm"
"seata.apache.org/seata-go/pkg/rm/tcc"
"seata.apache.org/seata-go/pkg/tm"
"seata.apache.org/seata-go/pkg/util/flagext"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/compressor/deflate_compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"compress/flate"
"io"

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

type DeflateCompress struct{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/datasource/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package datasource

import (
"github.com/seata/seata-go/pkg/datasource/sql"
"seata.apache.org/seata-go/pkg/datasource/sql"
)

func Init() {
Expand Down
12 changes: 6 additions & 6 deletions pkg/datasource/sql/async_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ import (
"flag"
"time"

"github.com/seata/seata-go/pkg/rm"
"seata.apache.org/seata-go/pkg/rm"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"

"github.com/seata/seata-go/pkg/datasource/sql/datasource"
"github.com/seata/seata-go/pkg/datasource/sql/undo"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/util/fanout"
"github.com/seata/seata-go/pkg/util/log"
"seata.apache.org/seata-go/pkg/datasource/sql/datasource"
"seata.apache.org/seata-go/pkg/datasource/sql/undo"
"seata.apache.org/seata-go/pkg/protocol/branch"
"seata.apache.org/seata-go/pkg/util/fanout"
"seata.apache.org/seata-go/pkg/util/log"
)

type phaseTwoContext struct {
Expand Down
12 changes: 6 additions & 6 deletions pkg/datasource/sql/at_resource_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (

"github.com/prometheus/client_golang/prometheus"

"github.com/seata/seata-go/pkg/datasource/sql/datasource"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/undo"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/rm"
serr "github.com/seata/seata-go/pkg/util/errors"
"seata.apache.org/seata-go/pkg/datasource/sql/datasource"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/datasource/sql/undo"
"seata.apache.org/seata-go/pkg/protocol/branch"
"seata.apache.org/seata-go/pkg/rm"
serr "seata.apache.org/seata-go/pkg/util/errors"
)

func InitAT(cfg undo.Config, asyncCfg AsyncWorkerConfig) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/datasource/sql/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"context"
"database/sql/driver"

"github.com/seata/seata-go/pkg/datasource/sql/exec"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/util"
"seata.apache.org/seata-go/pkg/datasource/sql/exec"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/datasource/sql/util"
)

// Conn is a connection to a database. It is not used concurrently
Expand Down
8 changes: 4 additions & 4 deletions pkg/datasource/sql/conn_at.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
gosql "database/sql"
"database/sql/driver"

"github.com/seata/seata-go/pkg/datasource/sql/exec"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
"seata.apache.org/seata-go/pkg/datasource/sql/exec"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/tm"
"seata.apache.org/seata-go/pkg/util/log"
)

// ATConn Database connection proxy object under XA transaction model
Expand Down
10 changes: 5 additions & 5 deletions pkg/datasource/sql/conn_at_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (
"github.com/google/uuid"
"github.com/stretchr/testify/assert"

"github.com/seata/seata-go/pkg/datasource/sql/exec"
"github.com/seata/seata-go/pkg/datasource/sql/mock"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/tm"
"seata.apache.org/seata-go/pkg/datasource/sql/exec"
"seata.apache.org/seata-go/pkg/datasource/sql/mock"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/protocol/branch"
"seata.apache.org/seata-go/pkg/tm"
)

func TestMain(m *testing.M) {
Expand Down
8 changes: 4 additions & 4 deletions pkg/datasource/sql/conn_xa.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"fmt"
"time"

"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/xa"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/datasource/sql/xa"
"seata.apache.org/seata-go/pkg/tm"
"seata.apache.org/seata-go/pkg/util/log"
)

var xaConnTimeout time.Duration
Expand Down
10 changes: 5 additions & 5 deletions pkg/datasource/sql/conn_xa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import (
"github.com/google/uuid"
"github.com/stretchr/testify/assert"

"github.com/seata/seata-go/pkg/datasource/sql/exec"
"github.com/seata/seata-go/pkg/datasource/sql/mock"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/tm"
"seata.apache.org/seata-go/pkg/datasource/sql/exec"
"seata.apache.org/seata-go/pkg/datasource/sql/mock"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/protocol/branch"
"seata.apache.org/seata-go/pkg/tm"
)

type mysqlMockRows struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/datasource/sql/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/go-sql-driver/mysql"

"github.com/seata/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
)

type seataATConnector struct {
Expand Down
8 changes: 4 additions & 4 deletions pkg/datasource/sql/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"

"github.com/seata/seata-go/pkg/datasource/sql/mock"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/util/reflectx"
"seata.apache.org/seata-go/pkg/datasource/sql/mock"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/protocol/branch"
"seata.apache.org/seata-go/pkg/util/reflectx"
)

type initConnectorFunc func(t *testing.T, ctrl *gomock.Controller) driver.Connector
Expand Down
2 changes: 1 addition & 1 deletion pkg/datasource/sql/datasource/base/meta_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"sync"
"time"

"github.com/seata/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
)

type (
Expand Down
6 changes: 3 additions & 3 deletions pkg/datasource/sql/datasource/datasource_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"fmt"
"sync"

"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/rm"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/protocol/branch"
"seata.apache.org/seata-go/pkg/rm"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pkg/datasource/sql/datasource/mysql/meta_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"sync"
"time"

"github.com/seata/seata-go/pkg/datasource/sql/datasource/base"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/datasource/sql/datasource/base"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pkg/datasource/sql/datasource/mysql/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (

"github.com/pkg/errors"

"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/undo/executor"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/datasource/sql/undo/executor"
)

type mysqlTrigger struct {
Expand Down
14 changes: 7 additions & 7 deletions pkg/datasource/sql/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import (
"fmt"
"sync"

"github.com/seata/seata-go/pkg/datasource/sql/datasource"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/undo"
"github.com/seata/seata-go/pkg/datasource/sql/util"
"github.com/seata/seata-go/pkg/datasource/sql/xa"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/util/log"
"seata.apache.org/seata-go/pkg/datasource/sql/datasource"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/datasource/sql/undo"
"seata.apache.org/seata-go/pkg/datasource/sql/util"
"seata.apache.org/seata-go/pkg/datasource/sql/xa"
"seata.apache.org/seata-go/pkg/protocol/branch"
"seata.apache.org/seata-go/pkg/util/log"
)

type dbOption func(db *DBResource)
Expand Down
12 changes: 6 additions & 6 deletions pkg/datasource/sql/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import (

"github.com/go-sql-driver/mysql"

"github.com/seata/seata-go/pkg/datasource/sql/datasource"
mysql2 "github.com/seata/seata-go/pkg/datasource/sql/datasource/mysql"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/util"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/util/log"
"seata.apache.org/seata-go/pkg/datasource/sql/datasource"
mysql2 "seata.apache.org/seata-go/pkg/datasource/sql/datasource/mysql"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/datasource/sql/util"
"seata.apache.org/seata-go/pkg/protocol/branch"
"seata.apache.org/seata-go/pkg/util/log"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions pkg/datasource/sql/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ import (
"reflect"
"testing"

"github.com/seata/seata-go/pkg/rm"
"seata.apache.org/seata-go/pkg/rm"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"

"github.com/seata/seata-go/pkg/datasource/sql/mock"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/util/reflectx"
"seata.apache.org/seata-go/pkg/datasource/sql/mock"
"seata.apache.org/seata-go/pkg/protocol/branch"
"seata.apache.org/seata-go/pkg/util/reflectx"
)

func initMockResourceManager(branchType branch.BranchType, ctrl *gomock.Controller) *mock.MockDataSourceManager {
Expand Down
10 changes: 5 additions & 5 deletions pkg/datasource/sql/exec/at/at_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ package at
import (
"context"

"github.com/seata/seata-go/pkg/datasource/sql/exec"
"github.com/seata/seata-go/pkg/datasource/sql/parser"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/util"
"github.com/seata/seata-go/pkg/tm"
"seata.apache.org/seata-go/pkg/datasource/sql/exec"
"seata.apache.org/seata-go/pkg/datasource/sql/parser"
"seata.apache.org/seata-go/pkg/datasource/sql/types"
"seata.apache.org/seata-go/pkg/datasource/sql/util"
"seata.apache.org/seata-go/pkg/tm"
)

func Init() {
Expand Down
Loading

0 comments on commit 7ef6d1c

Please sign in to comment.