Skip to content

Commit

Permalink
Merge pull request #238 from aergoio/fix/AMAIN-143-go-pkg
Browse files Browse the repository at this point in the history
Change package path to follow versionng policy of go module
  • Loading branch information
hayarobi authored Aug 18, 2023
2 parents d1b2a98 + f28617a commit e273c52
Show file tree
Hide file tree
Showing 410 changed files with 1,506 additions and 1,489 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif()

add_custom_target(build ALL DEPENDS aergocli aergosvr aergoluac brick)

add_custom_target(aergocli GO111MODULE=on GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"-X github.com/aergoio/aergo/cmd/aergocli/cmd.githash=`git describe --tags`\" ./cmd/aergocli/...
add_custom_target(aergocli GO111MODULE=on GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"-X github.com/aergoio/aergo/v2/cmd/aergocli/cmd.githash=`git describe --tags`\" ./cmd/aergocli/...
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS libtool)

Expand All @@ -28,14 +28,14 @@ add_custom_target(aergosvr GO111MODULE=on GOBIN=${BIN_DIR} go install ${GCFLAGS}
add_custom_target(polaris GO111MODULE=on GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"-X main.githash=`git describe --tags`\" ./cmd/polaris/...
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})

add_custom_target(colaris GO111MODULE=on GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"-X github.com/aergoio/aergo/cmd/colaris/cmd.githash=`git describe --tags`\" ./cmd/colaris/...
add_custom_target(colaris GO111MODULE=on GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"-X github.com/aergoio/aergo/v2/cmd/colaris/cmd.githash=`git describe --tags`\" ./cmd/colaris/...
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})

add_custom_target(aergoluac GO111MODULE=on GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"-X main.githash=`git describe --tags`\" ./cmd/aergoluac/...
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS libtool)

add_custom_target(brick GO111MODULE=on GOBIN=${BIN_DIR} go install ${GCFLAGS} ${GFLAG} -ldflags \"-X 'github.com/aergoio/aergo/cmd/brick/context.GitHash=`git describe --tags`'
add_custom_target(brick GO111MODULE=on GOBIN=${BIN_DIR} go install ${GCFLAGS} ${GFLAG} -ldflags \"-X 'github.com/aergoio/aergo/v2/cmd/brick/context.GitHash=`git describe --tags`'
-X 'github.com/aergoio/aergo-lib/log.defaultConfStr=`cat ./cmd/brick/arglog.toml`'\" ./cmd/brick/...
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS libtool)
Expand Down
14 changes: 7 additions & 7 deletions account/accountservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (

"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo-lib/log"
"github.com/aergoio/aergo/account/key"
cfg "github.com/aergoio/aergo/config"
"github.com/aergoio/aergo/contract/name"
"github.com/aergoio/aergo/message"
"github.com/aergoio/aergo/pkg/component"
"github.com/aergoio/aergo/state"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/account/key"
cfg "github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/contract/name"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
)

type AccountService struct {
Expand Down
6 changes: 3 additions & 3 deletions account/accountservice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"testing"

"github.com/aergoio/aergo-lib/db"
"github.com/aergoio/aergo/config"
"github.com/aergoio/aergo/state"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions account/key/aergo_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"strings"
"sync"

crypto "github.com/aergoio/aergo/account/key/crypto"
"github.com/aergoio/aergo/types"
crypto "github.com/aergoio/aergo/v2/account/key/crypto"
"github.com/aergoio/aergo/v2/types"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion account/key/aergo_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"reflect"
"testing"

crypto "github.com/aergoio/aergo/account/key/crypto"
crypto "github.com/aergoio/aergo/v2/account/key/crypto"
"github.com/btcsuite/btcd/btcec"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion account/key/badgerdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"sync"

"github.com/aergoio/aergo-lib/db"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/types"
"github.com/btcsuite/btcd/btcec"
)

Expand Down
2 changes: 1 addition & 1 deletion account/key/badgerdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"reflect"
"testing"

crypto "github.com/aergoio/aergo/account/key/crypto"
crypto "github.com/aergoio/aergo/v2/account/key/crypto"
"github.com/btcsuite/btcd/btcec"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion account/key/crypto/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"crypto/ecdsa"
"encoding/binary"

"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/types"
)

// GenerateAddress calculates the raw (not-encoded) address for a private key.
Expand Down
2 changes: 1 addition & 1 deletion account/key/crypto/address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package key
import (
"testing"

"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/types"
"github.com/btcsuite/btcd/btcec"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion account/key/crypto/v1strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"io"
"reflect"

"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/types"
"github.com/btcsuite/btcd/btcec"
"golang.org/x/crypto/scrypt"
)
Expand Down
2 changes: 1 addition & 1 deletion account/key/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package key
import (
"encoding/binary"

"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/types"
"github.com/btcsuite/btcd/btcec"
sha256 "github.com/minio/sha256-simd"
)
Expand Down
4 changes: 2 additions & 2 deletions account/key/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"sync"
"time"

crypto "github.com/aergoio/aergo/account/key/crypto"
"github.com/aergoio/aergo/types"
crypto "github.com/aergoio/aergo/v2/account/key/crypto"
"github.com/aergoio/aergo/v2/types"
"github.com/btcsuite/btcd/btcec"
)

Expand Down
4 changes: 2 additions & 2 deletions account/key/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"sync"
"testing"

crypto "github.com/aergoio/aergo/account/key/crypto"
"github.com/aergoio/aergo/types"
crypto "github.com/aergoio/aergo/v2/account/key/crypto"
"github.com/aergoio/aergo/v2/types"
"github.com/btcsuite/btcd/btcec"
"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions account/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package account

import (
"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo/account/key"
"github.com/aergoio/aergo/message"
"github.com/aergoio/aergo/v2/account/key"
"github.com/aergoio/aergo/v2/message"
)

type Signer struct {
Expand Down
8 changes: 4 additions & 4 deletions chain/blockvalidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"errors"
"fmt"

"github.com/aergoio/aergo/internal/enc"
"github.com/aergoio/aergo/pkg/component"
"github.com/aergoio/aergo/state"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/internal/enc"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
)

type BlockValidator struct {
Expand Down
4 changes: 2 additions & 2 deletions chain/chainanchor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
package chain

import (
"github.com/aergoio/aergo/internal/enc"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/internal/enc"
"github.com/aergoio/aergo/v2/types"
)

type ChainAnchor []([]byte)
Expand Down
10 changes: 5 additions & 5 deletions chain/chaindb.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import (
"sync/atomic"

"github.com/aergoio/aergo-lib/db"
"github.com/aergoio/aergo/config"
"github.com/aergoio/aergo/consensus"
"github.com/aergoio/aergo/internal/common"
"github.com/aergoio/aergo/internal/enc"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/consensus"
"github.com/aergoio/aergo/v2/internal/common"
"github.com/aergoio/aergo/v2/internal/enc"
"github.com/aergoio/aergo/v2/types"
"github.com/golang/protobuf/proto"
)

Expand Down
4 changes: 2 additions & 2 deletions chain/chaindbForRaft.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"errors"

"github.com/aergoio/aergo-lib/db"
"github.com/aergoio/aergo/consensus"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/consensus"
"github.com/aergoio/aergo/v2/types"
"github.com/aergoio/etcd/raft/raftpb"
"github.com/golang/protobuf/proto"
)
Expand Down
16 changes: 8 additions & 8 deletions chain/chainhandle.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import (
"fmt"
"math/big"

"github.com/aergoio/aergo/consensus"
"github.com/aergoio/aergo/contract"
"github.com/aergoio/aergo/contract/name"
"github.com/aergoio/aergo/contract/system"
"github.com/aergoio/aergo/internal/enc"
"github.com/aergoio/aergo/message"
"github.com/aergoio/aergo/state"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/consensus"
"github.com/aergoio/aergo/v2/contract"
"github.com/aergoio/aergo/v2/contract/name"
"github.com/aergoio/aergo/v2/contract/system"
"github.com/aergoio/aergo/v2/internal/enc"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
"github.com/golang/protobuf/proto"
)

Expand Down
12 changes: 6 additions & 6 deletions chain/chainhandle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"testing"

"github.com/aergoio/aergo-lib/db"
"github.com/aergoio/aergo/account/key"
"github.com/aergoio/aergo/contract"
"github.com/aergoio/aergo/contract/system"
"github.com/aergoio/aergo/internal/common"
"github.com/aergoio/aergo/state"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/account/key"
"github.com/aergoio/aergo/v2/contract"
"github.com/aergoio/aergo/v2/contract/system"
"github.com/aergoio/aergo/v2/internal/common"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
"github.com/stretchr/testify/assert"
)

Expand Down
26 changes: 13 additions & 13 deletions chain/chainservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ import (

"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo-lib/log"
cfg "github.com/aergoio/aergo/config"
"github.com/aergoio/aergo/consensus"
"github.com/aergoio/aergo/contract"
"github.com/aergoio/aergo/contract/enterprise"
"github.com/aergoio/aergo/contract/name"
"github.com/aergoio/aergo/contract/system"
"github.com/aergoio/aergo/fee"
"github.com/aergoio/aergo/internal/enc"
"github.com/aergoio/aergo/message"
"github.com/aergoio/aergo/p2p/p2putil"
"github.com/aergoio/aergo/pkg/component"
"github.com/aergoio/aergo/state"
"github.com/aergoio/aergo/types"
cfg "github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/consensus"
"github.com/aergoio/aergo/v2/contract"
"github.com/aergoio/aergo/v2/contract/enterprise"
"github.com/aergoio/aergo/v2/contract/name"
"github.com/aergoio/aergo/v2/contract/system"
"github.com/aergoio/aergo/v2/fee"
"github.com/aergoio/aergo/v2/internal/enc"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/p2p/p2putil"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
lru "github.com/hashicorp/golang-lru"
)

Expand Down
8 changes: 4 additions & 4 deletions chain/chainservice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"fmt"
"testing"

"github.com/aergoio/aergo/config"
"github.com/aergoio/aergo/consensus"
"github.com/aergoio/aergo/state"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/consensus"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
"github.com/stretchr/testify/assert"
)

Expand Down
8 changes: 4 additions & 4 deletions chain/chainverifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"time"

"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo/internal/enc"
"github.com/aergoio/aergo/message"
"github.com/aergoio/aergo/pkg/component"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/internal/enc"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/types"
)

type ChainVerifier struct {
Expand Down
6 changes: 3 additions & 3 deletions chain/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ package chain
import (
"errors"

"github.com/aergoio/aergo/consensus"
"github.com/aergoio/aergo/internal/enc"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/consensus"
"github.com/aergoio/aergo/v2/internal/enc"
"github.com/aergoio/aergo/v2/types"
)

const pubNetMaxBlockBodySize = 4000000
Expand Down
14 changes: 7 additions & 7 deletions chain/governance.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ package chain
import (
"math/big"

"github.com/aergoio/aergo/consensus"
"github.com/aergoio/aergo/contract"
"github.com/aergoio/aergo/contract/enterprise"
"github.com/aergoio/aergo/contract/name"
"github.com/aergoio/aergo/contract/system"
"github.com/aergoio/aergo/state"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/consensus"
"github.com/aergoio/aergo/v2/contract"
"github.com/aergoio/aergo/v2/contract/enterprise"
"github.com/aergoio/aergo/v2/contract/name"
"github.com/aergoio/aergo/v2/contract/system"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
)

func executeGovernanceTx(ccc consensus.ChainConsensusCluster, bs *state.BlockState, txBody *types.TxBody, sender, receiver *state.V,
Expand Down
4 changes: 2 additions & 2 deletions chain/orphanpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"errors"
"sync"

"github.com/aergoio/aergo/internal/enc"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/internal/enc"
"github.com/aergoio/aergo/v2/types"
"github.com/hashicorp/golang-lru/simplelru"
)

Expand Down
2 changes: 1 addition & 1 deletion chain/orphanpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package chain
import (
"testing"

"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/types"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions chain/recover.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"runtime"
"runtime/debug"

"github.com/aergoio/aergo/internal/enc"
"github.com/aergoio/aergo/types"
"github.com/aergoio/aergo/v2/internal/enc"
"github.com/aergoio/aergo/v2/types"
)

var (
Expand Down
Loading

0 comments on commit e273c52

Please sign in to comment.