diff --git a/cmd/cli/main.go b/cmd/cli/main.go index 60fd9275..a632a88d 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -6,12 +6,12 @@ import ( "strings" "github.com/pactus-project/pactus/crypto" - pagu "github.com/pagu-project/Pagu" - pagucmd "github.com/pagu-project/Pagu/cmd" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/internal/engine" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/log" + "github.com/pagu-project/pagu" + pagucmd "github.com/pagu-project/pagu/cmd" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/internal/engine" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/log" "github.com/spf13/cobra" ) diff --git a/cmd/discord/main.go b/cmd/discord/main.go index ecf265bc..165316ae 100644 --- a/cmd/discord/main.go +++ b/cmd/discord/main.go @@ -1,8 +1,8 @@ package main import ( - pagu "github.com/pagu-project/Pagu" - "github.com/pagu-project/Pagu/cmd" + "github.com/pagu-project/pagu" + "github.com/pagu-project/pagu/cmd" "github.com/spf13/cobra" ) diff --git a/cmd/discord/run.go b/cmd/discord/run.go index d5a47932..ea05c069 100644 --- a/cmd/discord/run.go +++ b/cmd/discord/run.go @@ -5,11 +5,11 @@ import ( "os/signal" "syscall" - pagucmd "github.com/pagu-project/Pagu/cmd" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/internal/engine" - "github.com/pagu-project/Pagu/internal/platforms/discord" - "github.com/pagu-project/Pagu/pkg/log" + pagucmd "github.com/pagu-project/pagu/cmd" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/internal/engine" + "github.com/pagu-project/pagu/internal/platforms/discord" + "github.com/pagu-project/pagu/pkg/log" "github.com/spf13/cobra" ) diff --git a/cmd/grpc/main.go b/cmd/grpc/main.go index b7e27f3a..e41167e1 100644 --- a/cmd/grpc/main.go +++ b/cmd/grpc/main.go @@ -1,8 +1,8 @@ package main import ( - pagu "github.com/pagu-project/Pagu" - "github.com/pagu-project/Pagu/cmd" + "github.com/pagu-project/pagu" + "github.com/pagu-project/pagu/cmd" "github.com/spf13/cobra" ) diff --git a/cmd/grpc/run.go b/cmd/grpc/run.go index 98c4c4a4..154cfb80 100644 --- a/cmd/grpc/run.go +++ b/cmd/grpc/run.go @@ -5,11 +5,11 @@ import ( "os/signal" "syscall" - pagucmd "github.com/pagu-project/Pagu/cmd" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/internal/delivery/grpc" - "github.com/pagu-project/Pagu/internal/engine" - "github.com/pagu-project/Pagu/pkg/log" + pagucmd "github.com/pagu-project/pagu/cmd" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/internal/delivery/grpc" + "github.com/pagu-project/pagu/internal/engine" + "github.com/pagu-project/pagu/pkg/log" "github.com/spf13/cobra" ) diff --git a/cmd/http/main.go b/cmd/http/main.go index 79f51614..a999fa49 100644 --- a/cmd/http/main.go +++ b/cmd/http/main.go @@ -1,8 +1,8 @@ package main import ( - pagu "github.com/pagu-project/Pagu" - "github.com/pagu-project/Pagu/cmd" + "github.com/pagu-project/pagu" + "github.com/pagu-project/pagu/cmd" "github.com/spf13/cobra" ) diff --git a/cmd/http/run.go b/cmd/http/run.go index 085be4f0..1a31e582 100644 --- a/cmd/http/run.go +++ b/cmd/http/run.go @@ -5,11 +5,11 @@ import ( "os/signal" "syscall" - pagucmd "github.com/pagu-project/Pagu/cmd" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/internal/delivery/http" - "github.com/pagu-project/Pagu/internal/engine" - "github.com/pagu-project/Pagu/pkg/log" + pagucmd "github.com/pagu-project/pagu/cmd" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/internal/delivery/http" + "github.com/pagu-project/pagu/internal/engine" + "github.com/pagu-project/pagu/pkg/log" "github.com/spf13/cobra" ) diff --git a/cmd/telegram/main.go b/cmd/telegram/main.go index 4ba3ea77..1f8d539f 100644 --- a/cmd/telegram/main.go +++ b/cmd/telegram/main.go @@ -1,8 +1,8 @@ package main import ( - pagu "github.com/pagu-project/Pagu" - "github.com/pagu-project/Pagu/cmd" + "github.com/pagu-project/pagu" + "github.com/pagu-project/pagu/cmd" "github.com/spf13/cobra" ) diff --git a/cmd/telegram/run.go b/cmd/telegram/run.go index 7f718218..8346093f 100644 --- a/cmd/telegram/run.go +++ b/cmd/telegram/run.go @@ -5,11 +5,11 @@ import ( "os/signal" "syscall" - pagucmd "github.com/pagu-project/Pagu/cmd" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/internal/engine" - "github.com/pagu-project/Pagu/internal/platforms/telegram" - "github.com/pagu-project/Pagu/pkg/log" + pagucmd "github.com/pagu-project/pagu/cmd" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/internal/engine" + "github.com/pagu-project/pagu/internal/platforms/telegram" + "github.com/pagu-project/pagu/pkg/log" "github.com/spf13/cobra" ) diff --git a/config/config.go b/config/config.go index 2812caad..a7487fc8 100644 --- a/config/config.go +++ b/config/config.go @@ -5,7 +5,7 @@ import ( "os" "github.com/pactus-project/pactus/util" - "github.com/pagu-project/Pagu/pkg/amount" + "github.com/pagu-project/pagu/pkg/amount" "gopkg.in/yaml.v3" ) diff --git a/go.mod b/go.mod index 41ec0f89..d30272bd 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/pagu-project/Pagu +module github.com/pagu-project/pagu go 1.23.3 @@ -13,6 +13,7 @@ require ( github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 + golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 golang.org/x/text v0.21.0 google.golang.org/grpc v1.69.2 google.golang.org/protobuf v1.36.1 @@ -57,7 +58,6 @@ require ( github.com/valyala/fasttemplate v1.2.2 // indirect github.com/x448/float16 v0.8.4 // indirect golang.org/x/crypto v0.31.0 // indirect - golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect golang.org/x/net v0.33.0 // indirect golang.org/x/sys v0.28.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241223144023-3abc09e42ca8 // indirect diff --git a/internal/delivery/grpc/pagu.go b/internal/delivery/grpc/pagu.go index ad1993cb..a15bec73 100644 --- a/internal/delivery/grpc/pagu.go +++ b/internal/delivery/grpc/pagu.go @@ -3,8 +3,8 @@ package grpc import ( "context" - pagu "github.com/pagu-project/Pagu/internal/delivery/grpc/gen/go" - "github.com/pagu-project/Pagu/internal/entity" + pagu "github.com/pagu-project/pagu/internal/delivery/grpc/gen/go" + "github.com/pagu-project/pagu/internal/entity" ) type paguServer struct { diff --git a/internal/delivery/grpc/server.go b/internal/delivery/grpc/server.go index 4cfdc791..8095aac2 100644 --- a/internal/delivery/grpc/server.go +++ b/internal/delivery/grpc/server.go @@ -4,10 +4,10 @@ import ( "context" "net" - "github.com/pagu-project/Pagu/config" - pagu "github.com/pagu-project/Pagu/internal/delivery/grpc/gen/go" - "github.com/pagu-project/Pagu/internal/engine" - "github.com/pagu-project/Pagu/pkg/log" + "github.com/pagu-project/pagu/config" + pagu "github.com/pagu-project/pagu/internal/delivery/grpc/gen/go" + "github.com/pagu-project/pagu/internal/engine" + "github.com/pagu-project/pagu/pkg/log" "google.golang.org/grpc" ) diff --git a/internal/delivery/http/http.go b/internal/delivery/http/http.go index 152a84d3..920a5776 100644 --- a/internal/delivery/http/http.go +++ b/internal/delivery/http/http.go @@ -4,10 +4,10 @@ import ( "net/http" "github.com/labstack/echo/v4" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/internal/engine" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/log" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/internal/engine" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/log" ) type HTTPServer struct { diff --git a/internal/engine/command/calculator/calculator.go b/internal/engine/command/calculator/calculator.go index ee95b6a9..29dfe464 100644 --- a/internal/engine/command/calculator/calculator.go +++ b/internal/engine/command/calculator/calculator.go @@ -1,9 +1,9 @@ package calculator import ( - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/client" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/client" ) const ( diff --git a/internal/engine/command/calculator/fee.go b/internal/engine/command/calculator/fee.go index bcd809af..e6ad56bb 100644 --- a/internal/engine/command/calculator/fee.go +++ b/internal/engine/command/calculator/fee.go @@ -3,9 +3,9 @@ package calculator import ( "errors" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/amount" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/amount" ) func (bc *Calculator) calcFeeHandler( diff --git a/internal/engine/command/calculator/reward.go b/internal/engine/command/calculator/reward.go index a2bdd878..542025c6 100644 --- a/internal/engine/command/calculator/reward.go +++ b/internal/engine/command/calculator/reward.go @@ -6,9 +6,9 @@ import ( "strconv" "github.com/pactus-project/pactus/types/amount" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/utils" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/utils" ) func (bc *Calculator) calcRewardHandler( diff --git a/internal/engine/command/command.go b/internal/engine/command/command.go index 3776d06d..cf9d610f 100644 --- a/internal/engine/command/command.go +++ b/internal/engine/command/command.go @@ -4,8 +4,8 @@ import ( "fmt" "slices" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/color" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/color" ) var ( diff --git a/internal/engine/command/market/market.go b/internal/engine/command/market/market.go index 92770133..02fe8528 100644 --- a/internal/engine/command/market/market.go +++ b/internal/engine/command/market/market.go @@ -1,10 +1,10 @@ package market import ( - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/cache" - "github.com/pagu-project/Pagu/pkg/client" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/cache" + "github.com/pagu-project/pagu/pkg/client" ) const ( diff --git a/internal/engine/command/market/price.go b/internal/engine/command/market/price.go index 4eb43314..5130a2a7 100644 --- a/internal/engine/command/market/price.go +++ b/internal/engine/command/market/price.go @@ -5,9 +5,9 @@ import ( "strconv" "strings" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" ) func (m *Market) getPrice(_ *entity.User, cmd *command.Command, _ map[string]string) command.CommandResult { diff --git a/internal/engine/command/market/price_test.go b/internal/engine/command/market/price_test.go index 7da7a25d..1ba3f896 100644 --- a/internal/engine/command/market/price_test.go +++ b/internal/engine/command/market/price_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/internal/job" - "github.com/pagu-project/Pagu/pkg/cache" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/internal/job" + "github.com/pagu-project/pagu/pkg/cache" "github.com/stretchr/testify/assert" ) diff --git a/internal/engine/command/middleware.go b/internal/engine/command/middleware.go index ca12be58..da3c91f4 100644 --- a/internal/engine/command/middleware.go +++ b/internal/engine/command/middleware.go @@ -1,9 +1,9 @@ package command import ( - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/internal/repository" - "github.com/pagu-project/Pagu/pkg/wallet" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/internal/repository" + "github.com/pagu-project/pagu/pkg/wallet" ) type MiddlewareFunc func(caller *entity.User, cmd *Command, args map[string]string) error diff --git a/internal/engine/command/network/health.go b/internal/engine/command/network/health.go index 431cee61..fe65214a 100644 --- a/internal/engine/command/network/health.go +++ b/internal/engine/command/network/health.go @@ -3,9 +3,9 @@ package network import ( "time" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - utils2 "github.com/pagu-project/Pagu/pkg/utils" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + utils2 "github.com/pagu-project/pagu/pkg/utils" ) func (n *Network) networkHealthHandler( diff --git a/internal/engine/command/network/network.go b/internal/engine/command/network/network.go index a06806e9..e5eeaec8 100644 --- a/internal/engine/command/network/network.go +++ b/internal/engine/command/network/network.go @@ -3,9 +3,9 @@ package network import ( "context" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/client" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/client" ) const ( diff --git a/internal/engine/command/network/node_info.go b/internal/engine/command/network/node_info.go index 8b03da4e..7f790a98 100644 --- a/internal/engine/command/network/node_info.go +++ b/internal/engine/command/network/node_info.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/pactus-project/pactus/types/amount" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - utils2 "github.com/pagu-project/Pagu/pkg/utils" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + utils2 "github.com/pagu-project/pagu/pkg/utils" ) func (n *Network) nodeInfoHandler(_ *entity.User, cmd *command.Command, args map[string]string) command.CommandResult { diff --git a/internal/engine/command/network/status.go b/internal/engine/command/network/status.go index 6f47ccd9..0b2b2d04 100644 --- a/internal/engine/command/network/status.go +++ b/internal/engine/command/network/status.go @@ -2,9 +2,9 @@ package network import ( "github.com/pactus-project/pactus/types/amount" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - utils2 "github.com/pagu-project/Pagu/pkg/utils" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + utils2 "github.com/pagu-project/pagu/pkg/utils" ) func (n *Network) networkStatusHandler( diff --git a/internal/engine/command/phoenix/faucet.go b/internal/engine/command/phoenix/faucet.go index a24b6287..1f84a9e1 100644 --- a/internal/engine/command/phoenix/faucet.go +++ b/internal/engine/command/phoenix/faucet.go @@ -3,8 +3,8 @@ package phoenix import ( "errors" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" ) func (pt *Phoenix) faucetHandler( diff --git a/internal/engine/command/phoenix/network_status.go b/internal/engine/command/phoenix/network_status.go index 7f4c61f7..3b24ef7b 100644 --- a/internal/engine/command/phoenix/network_status.go +++ b/internal/engine/command/phoenix/network_status.go @@ -2,10 +2,10 @@ package phoenix import ( "github.com/pactus-project/pactus/types/amount" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/engine/command/network" - "github.com/pagu-project/Pagu/internal/entity" - utils2 "github.com/pagu-project/Pagu/pkg/utils" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/engine/command/network" + "github.com/pagu-project/pagu/internal/entity" + utils2 "github.com/pagu-project/pagu/pkg/utils" ) func (pt *Phoenix) networkStatusHandler( diff --git a/internal/engine/command/phoenix/phoenix.go b/internal/engine/command/phoenix/phoenix.go index 435405ea..ae7556bc 100644 --- a/internal/engine/command/phoenix/phoenix.go +++ b/internal/engine/command/phoenix/phoenix.go @@ -4,12 +4,12 @@ import ( "context" "fmt" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/internal/repository" - "github.com/pagu-project/Pagu/pkg/amount" - "github.com/pagu-project/Pagu/pkg/client" - "github.com/pagu-project/Pagu/pkg/wallet" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/internal/repository" + "github.com/pagu-project/pagu/pkg/amount" + "github.com/pagu-project/pagu/pkg/client" + "github.com/pagu-project/pagu/pkg/wallet" ) const ( diff --git a/internal/engine/command/phoenix/wallet.go b/internal/engine/command/phoenix/wallet.go index 9cc5a2f0..b6b8c877 100644 --- a/internal/engine/command/phoenix/wallet.go +++ b/internal/engine/command/phoenix/wallet.go @@ -1,8 +1,8 @@ package phoenix import ( - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" ) //nolint:unused // remove me after I am used diff --git a/internal/engine/command/role_middleware.go b/internal/engine/command/role_middleware.go index 216c735d..087cdd07 100644 --- a/internal/engine/command/role_middleware.go +++ b/internal/engine/command/role_middleware.go @@ -3,7 +3,7 @@ package command import ( "errors" - "github.com/pagu-project/Pagu/internal/entity" + "github.com/pagu-project/pagu/internal/entity" ) func (*MiddlewareHandler) OnlyAdmin(caller *entity.User, _ *Command, _ map[string]string) error { diff --git a/internal/engine/command/voucher/claim.go b/internal/engine/command/voucher/claim.go index 48438621..9bec0c98 100644 --- a/internal/engine/command/voucher/claim.go +++ b/internal/engine/command/voucher/claim.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/log" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/log" ) func (v *Voucher) claimHandler( diff --git a/internal/engine/command/voucher/claim_test.go b/internal/engine/command/voucher/claim_test.go index 6a42bf2d..2522dbcd 100644 --- a/internal/engine/command/voucher/claim_test.go +++ b/internal/engine/command/voucher/claim_test.go @@ -4,9 +4,9 @@ import ( "errors" "testing" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/amount" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/amount" "github.com/stretchr/testify/assert" ) diff --git a/internal/engine/command/voucher/create.go b/internal/engine/command/voucher/create.go index dab6f4bb..65aae09f 100644 --- a/internal/engine/command/voucher/create.go +++ b/internal/engine/command/voucher/create.go @@ -12,11 +12,11 @@ import ( "github.com/jszwec/csvutil" "github.com/pactus-project/pactus/util/logger" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/amount" - "github.com/pagu-project/Pagu/pkg/notification" - "github.com/pagu-project/Pagu/pkg/utils" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/amount" + "github.com/pagu-project/pagu/pkg/notification" + "github.com/pagu-project/pagu/pkg/utils" "gorm.io/datatypes" ) diff --git a/internal/engine/command/voucher/create_test.go b/internal/engine/command/voucher/create_test.go index ae0aa540..74e2c596 100644 --- a/internal/engine/command/voucher/create_test.go +++ b/internal/engine/command/voucher/create_test.go @@ -5,11 +5,11 @@ import ( "testing" "github.com/h2non/gock" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/internal/repository" - "github.com/pagu-project/Pagu/pkg/client" - "github.com/pagu-project/Pagu/pkg/wallet" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/internal/repository" + "github.com/pagu-project/pagu/pkg/client" + "github.com/pagu-project/pagu/pkg/wallet" "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" ) diff --git a/internal/engine/command/voucher/status.go b/internal/engine/command/voucher/status.go index 7ca7ce08..01873201 100644 --- a/internal/engine/command/voucher/status.go +++ b/internal/engine/command/voucher/status.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/amount" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/amount" ) func (v *Voucher) statusHandler(_ *entity.User, cmd *command.Command, args map[string]string) command.CommandResult { diff --git a/internal/engine/command/voucher/status_test.go b/internal/engine/command/voucher/status_test.go index 4e8248cc..8ef9169d 100644 --- a/internal/engine/command/voucher/status_test.go +++ b/internal/engine/command/voucher/status_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/amount" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/amount" "github.com/stretchr/testify/assert" "gorm.io/gorm" ) diff --git a/internal/engine/command/voucher/voucher.go b/internal/engine/command/voucher/voucher.go index de65aea5..81d00245 100644 --- a/internal/engine/command/voucher/voucher.go +++ b/internal/engine/command/voucher/voucher.go @@ -1,11 +1,11 @@ package voucher import ( - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/internal/repository" - "github.com/pagu-project/Pagu/pkg/client" - "github.com/pagu-project/Pagu/pkg/wallet" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/internal/repository" + "github.com/pagu-project/pagu/pkg/client" + "github.com/pagu-project/pagu/pkg/wallet" ) const ( diff --git a/internal/engine/command/wallet_middleware.go b/internal/engine/command/wallet_middleware.go index 74d43b49..752e7950 100644 --- a/internal/engine/command/wallet_middleware.go +++ b/internal/engine/command/wallet_middleware.go @@ -3,7 +3,7 @@ package command import ( "fmt" - "github.com/pagu-project/Pagu/internal/entity" + "github.com/pagu-project/pagu/internal/entity" ) const minWalletBalance = 500 diff --git a/internal/engine/command/zealy/claim.go b/internal/engine/command/zealy/claim.go index 0ffda100..d3321854 100644 --- a/internal/engine/command/zealy/claim.go +++ b/internal/engine/command/zealy/claim.go @@ -3,9 +3,9 @@ package zealy import ( "fmt" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/log" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/log" ) func (z *Zealy) claimHandler(caller *entity.User, cmd *command.Command, args map[string]string) command.CommandResult { diff --git a/internal/engine/command/zealy/status.go b/internal/engine/command/zealy/status.go index 331e9bd0..a5bedcb7 100644 --- a/internal/engine/command/zealy/status.go +++ b/internal/engine/command/zealy/status.go @@ -1,9 +1,9 @@ package zealy import ( - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/amount" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/amount" ) func (z *Zealy) statusHandler(_ *entity.User, cmd *command.Command, _ map[string]string) command.CommandResult { diff --git a/internal/engine/command/zealy/zealy.go b/internal/engine/command/zealy/zealy.go index 9d0d1104..ae42ba67 100644 --- a/internal/engine/command/zealy/zealy.go +++ b/internal/engine/command/zealy/zealy.go @@ -1,10 +1,10 @@ package zealy import ( - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/internal/repository" - "github.com/pagu-project/Pagu/pkg/wallet" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/internal/repository" + "github.com/pagu-project/pagu/pkg/wallet" ) const ( diff --git a/internal/engine/engine.go b/internal/engine/engine.go index d6659b6b..02784d27 100644 --- a/internal/engine/engine.go +++ b/internal/engine/engine.go @@ -7,24 +7,24 @@ import ( "strings" "time" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/engine/command/calculator" - "github.com/pagu-project/Pagu/internal/engine/command/market" - "github.com/pagu-project/Pagu/internal/engine/command/network" - phoenixtestnet "github.com/pagu-project/Pagu/internal/engine/command/phoenix" - "github.com/pagu-project/Pagu/internal/engine/command/voucher" - "github.com/pagu-project/Pagu/internal/engine/command/zealy" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/internal/job" - "github.com/pagu-project/Pagu/internal/repository" - "github.com/pagu-project/Pagu/pkg/amount" - "github.com/pagu-project/Pagu/pkg/cache" - "github.com/pagu-project/Pagu/pkg/client" - "github.com/pagu-project/Pagu/pkg/log" - "github.com/pagu-project/Pagu/pkg/notification" - "github.com/pagu-project/Pagu/pkg/notification/zoho" - "github.com/pagu-project/Pagu/pkg/wallet" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/engine/command/calculator" + "github.com/pagu-project/pagu/internal/engine/command/market" + "github.com/pagu-project/pagu/internal/engine/command/network" + phoenixtestnet "github.com/pagu-project/pagu/internal/engine/command/phoenix" + "github.com/pagu-project/pagu/internal/engine/command/voucher" + "github.com/pagu-project/pagu/internal/engine/command/zealy" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/internal/job" + "github.com/pagu-project/pagu/internal/repository" + "github.com/pagu-project/pagu/pkg/amount" + "github.com/pagu-project/pagu/pkg/cache" + "github.com/pagu-project/pagu/pkg/client" + "github.com/pagu-project/pagu/pkg/log" + "github.com/pagu-project/pagu/pkg/notification" + "github.com/pagu-project/pagu/pkg/notification/zoho" + "github.com/pagu-project/pagu/pkg/wallet" ) type BotEngine struct { diff --git a/internal/entity/faucet.go b/internal/entity/faucet.go index f2e39975..31b3f8bf 100644 --- a/internal/entity/faucet.go +++ b/internal/entity/faucet.go @@ -3,7 +3,7 @@ package entity import ( "time" - "github.com/pagu-project/Pagu/pkg/amount" + "github.com/pagu-project/pagu/pkg/amount" "gorm.io/gorm" ) diff --git a/internal/entity/notification.go b/internal/entity/notification.go index 43cf00cf..8f166c38 100644 --- a/internal/entity/notification.go +++ b/internal/entity/notification.go @@ -1,7 +1,7 @@ package entity import ( - "github.com/pagu-project/Pagu/pkg/notification" + "github.com/pagu-project/pagu/pkg/notification" "gorm.io/datatypes" "gorm.io/gorm" ) diff --git a/internal/entity/voucher.go b/internal/entity/voucher.go index c7a95d67..eeb4276e 100644 --- a/internal/entity/voucher.go +++ b/internal/entity/voucher.go @@ -1,7 +1,7 @@ package entity import ( - "github.com/pagu-project/Pagu/pkg/amount" + "github.com/pagu-project/pagu/pkg/amount" "gorm.io/gorm" ) diff --git a/internal/entity/zealy.go b/internal/entity/zealy.go index 6d8bc21a..e3a18980 100644 --- a/internal/entity/zealy.go +++ b/internal/entity/zealy.go @@ -1,7 +1,7 @@ package entity import ( - "github.com/pagu-project/Pagu/pkg/amount" + "github.com/pagu-project/pagu/pkg/amount" "gorm.io/gorm" ) diff --git a/internal/job/notification.go b/internal/job/notification.go index 1131f9cd..d62fb1a6 100644 --- a/internal/job/notification.go +++ b/internal/job/notification.go @@ -6,9 +6,9 @@ import ( "time" "github.com/pactus-project/pactus/util/logger" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/internal/repository" - "github.com/pagu-project/Pagu/pkg/notification" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/internal/repository" + "github.com/pagu-project/pagu/pkg/notification" ) type mailSenderJob struct { diff --git a/internal/job/price.go b/internal/job/price.go index d3164876..ef3bb586 100644 --- a/internal/job/price.go +++ b/internal/job/price.go @@ -8,10 +8,10 @@ import ( "sync" "time" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/cache" - "github.com/pagu-project/Pagu/pkg/log" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/cache" + "github.com/pagu-project/pagu/pkg/log" ) const ( diff --git a/internal/platforms/discord/discord.go b/internal/platforms/discord/discord.go index 18590a1b..f6faf200 100644 --- a/internal/platforms/discord/discord.go +++ b/internal/platforms/discord/discord.go @@ -9,13 +9,13 @@ import ( "github.com/bwmarrin/discordgo" "github.com/pactus-project/pactus/types/amount" "github.com/pactus-project/pactus/util" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/internal/engine" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/color" - "github.com/pagu-project/Pagu/pkg/log" - "github.com/pagu-project/Pagu/pkg/utils" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/internal/engine" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/color" + "github.com/pagu-project/pagu/pkg/log" + "github.com/pagu-project/pagu/pkg/utils" ) type Bot struct { diff --git a/internal/platforms/telegram/telegram.go b/internal/platforms/telegram/telegram.go index de677fd6..5ea3f62d 100644 --- a/internal/platforms/telegram/telegram.go +++ b/internal/platforms/telegram/telegram.go @@ -8,11 +8,11 @@ import ( "time" "github.com/pactus-project/pactus/util" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/internal/engine" - "github.com/pagu-project/Pagu/internal/engine/command" - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/log" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/internal/engine" + "github.com/pagu-project/pagu/internal/engine/command" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/log" "golang.org/x/text/cases" "golang.org/x/text/language" tele "gopkg.in/telebot.v3" diff --git a/internal/repository/database.go b/internal/repository/database.go index 5318e23d..2149679d 100644 --- a/internal/repository/database.go +++ b/internal/repository/database.go @@ -4,7 +4,7 @@ import ( "errors" "strings" - "github.com/pagu-project/Pagu/internal/entity" + "github.com/pagu-project/pagu/internal/entity" "gorm.io/driver/mysql" "gorm.io/driver/sqlite" "gorm.io/gorm" diff --git a/internal/repository/faucet.go b/internal/repository/faucet.go index ab680df0..3db2e041 100644 --- a/internal/repository/faucet.go +++ b/internal/repository/faucet.go @@ -3,7 +3,7 @@ package repository import ( "time" - "github.com/pagu-project/Pagu/internal/entity" + "github.com/pagu-project/pagu/internal/entity" ) type IFaucet interface { diff --git a/internal/repository/mock.go b/internal/repository/mock.go index 1f6e331a..ef6b6292 100644 --- a/internal/repository/mock.go +++ b/internal/repository/mock.go @@ -12,7 +12,7 @@ package repository import ( reflect "reflect" - entity "github.com/pagu-project/Pagu/internal/entity" + entity "github.com/pagu-project/pagu/internal/entity" gomock "go.uber.org/mock/gomock" ) diff --git a/internal/repository/notification.go b/internal/repository/notification.go index 4d734e83..cdd97455 100644 --- a/internal/repository/notification.go +++ b/internal/repository/notification.go @@ -1,8 +1,8 @@ package repository import ( - "github.com/pagu-project/Pagu/internal/entity" - "github.com/pagu-project/Pagu/pkg/notification" + "github.com/pagu-project/pagu/internal/entity" + "github.com/pagu-project/pagu/pkg/notification" ) type INotification interface { diff --git a/internal/repository/user.go b/internal/repository/user.go index 55672c85..ca1c08b8 100644 --- a/internal/repository/user.go +++ b/internal/repository/user.go @@ -1,6 +1,6 @@ package repository -import "github.com/pagu-project/Pagu/internal/entity" +import "github.com/pagu-project/pagu/internal/entity" type IUser interface { AddUser(u *entity.User) error diff --git a/internal/repository/validator.go b/internal/repository/validator.go index cbdcdaa1..cdb16915 100644 --- a/internal/repository/validator.go +++ b/internal/repository/validator.go @@ -1,6 +1,6 @@ package repository -import "github.com/pagu-project/Pagu/internal/entity" +import "github.com/pagu-project/pagu/internal/entity" type IValidator interface { AddValidator(*entity.Validator) error diff --git a/internal/repository/voucher.go b/internal/repository/voucher.go index b0450b51..32a5d579 100644 --- a/internal/repository/voucher.go +++ b/internal/repository/voucher.go @@ -1,7 +1,7 @@ package repository import ( - "github.com/pagu-project/Pagu/internal/entity" + "github.com/pagu-project/pagu/internal/entity" ) type IVoucher interface { diff --git a/internal/repository/zealy.go b/internal/repository/zealy.go index 266423c6..e9d5bd3f 100644 --- a/internal/repository/zealy.go +++ b/internal/repository/zealy.go @@ -1,6 +1,6 @@ package repository -import "github.com/pagu-project/Pagu/internal/entity" +import "github.com/pagu-project/pagu/internal/entity" type IZealy interface { GetZealyUser(id string) (*entity.ZealyUser, error) diff --git a/internal/testsuite/testsuite.go b/internal/testsuite/testsuite.go new file mode 100644 index 00000000..13a41b89 --- /dev/null +++ b/internal/testsuite/testsuite.go @@ -0,0 +1,220 @@ +package testsuite + +import ( + "encoding/hex" + "math/rand" + "slices" + "testing" + "time" + + "github.com/pagu-project/pagu/pkg/amount" +) + +// TestSuite provides a set of helper functions for testing purposes. +// All the random values are generated based on a logged seed. +// By using a pre-generated seed, it is possible to reproduce failed tests +// by re-evaluating all the random values. This helps in identifying and debugging +// failures in testing conditions. +type TestSuite struct { + Seed int64 + Rand *rand.Rand +} + +func GenerateSeed() int64 { + return time.Now().UTC().UnixNano() +} + +// NewTestSuiteFromSeed creates a new TestSuite with the given seed. +func NewTestSuiteFromSeed(seed int64) *TestSuite { + return &TestSuite{ + Seed: seed, + //nolint:gosec // to reproduce the failed tests + Rand: rand.New(rand.NewSource(seed)), + } +} + +// NewTestSuite creates a new TestSuite by generating new seed. +func NewTestSuite(t *testing.T) *TestSuite { + t.Helper() + + seed := GenerateSeed() + t.Logf("%v seed is %v", t.Name(), seed) + + return &TestSuite{ + Seed: seed, + //nolint:gosec // to reproduce the failed tests + Rand: rand.New(rand.NewSource(seed)), + } +} + +// RandBool returns a random boolean value. +func (ts *TestSuite) RandBool() bool { + return ts.RandInt64(2) == 0 +} + +// RandInt8 returns a random int8 between 0 and max: [0, max). +func (ts *TestSuite) RandInt8(max int8) int8 { + return int8(ts.RandUint64(uint64(max))) +} + +// RandUint8 returns a random uint8 between 0 and max: [0, max). +func (ts *TestSuite) RandUint8(max uint8) uint8 { + return uint8(ts.RandUint64(uint64(max))) +} + +// RandInt16 returns a random int16 between 0 and max: [0, max). +func (ts *TestSuite) RandInt16(max int16) int16 { + return int16(ts.RandUint64(uint64(max))) +} + +// RandUint16 returns a random uint16 between 0 and max: [0, max). +func (ts *TestSuite) RandUint16(max uint16) uint16 { + return uint16(ts.RandUint64(uint64(max))) +} + +// RandInt32 returns a random int32 between 0 and max: [0, max). +func (ts *TestSuite) RandInt32(max int32) int32 { + return int32(ts.RandUint64(uint64(max))) +} + +// RandUint32 returns a random uint32 between 0 and max: [0, max). +func (ts *TestSuite) RandUint32(max uint32) uint32 { + return uint32(ts.RandUint64(uint64(max))) +} + +// RandInt64 returns a random int64 between 0 and max: [0, max). +func (ts *TestSuite) RandInt64(max int64) int64 { + return ts.Rand.Int63n(max) +} + +// RandUint64 returns a random uint64 between 0 and max: [0, max). +func (ts *TestSuite) RandUint64(max uint64) uint64 { + return uint64(ts.RandInt64(int64(max))) +} + +// RandInt returns a random int between 0 and max: [0, max). +func (ts *TestSuite) RandInt(max int) int { + return int(ts.RandInt64(int64(max))) +} + +// RandInt16NonZero returns a random int16 between 1 and max+1: [1, max+1). +func (ts *TestSuite) RandInt16NonZero(max int16) int16 { + return ts.RandInt16(max) + 1 +} + +// RandUint16NonZero returns a random uint16 between 1 and max+1: [1, max+1). +func (ts *TestSuite) RandUint16NonZero(max uint16) uint16 { + return ts.RandUint16(max) + 1 +} + +// RandInt32NonZero returns a random int32 between 1 and max+1: [1, max+1). +func (ts *TestSuite) RandInt32NonZero(max int32) int32 { + return ts.RandInt32(max) + 1 +} + +// RandUint32NonZero returns a random uint32 between 1 and max+1: [1, max+1). +func (ts *TestSuite) RandUint32NonZero(max uint32) uint32 { + return ts.RandUint32(max) + 1 +} + +// RandInt64NonZero returns a random int64 between 1 and max+1: [1, max+1). +func (ts *TestSuite) RandInt64NonZero(max int64) int64 { + return ts.RandInt64(max) + 1 +} + +// RandUint64NonZero returns a random uint64 between 1 and max+1: [1, max+1). +func (ts *TestSuite) RandUint64NonZero(max uint64) uint64 { + return ts.RandUint64(max) + 1 +} + +// RandIntNonZero returns a random int between 1 and max+1: [1, max+1). +func (ts *TestSuite) RandIntNonZero(max int) int { + return ts.RandInt(max) + 1 +} + +// RandHeight returns a random number between [1000, 1000000] for block height. +func (ts *TestSuite) RandHeight() uint32 { + return ts.RandUint32NonZero(1e6-1000) + 1000 +} + +// RandRound returns a random number between [0, 10) for block round. +func (ts *TestSuite) RandRound() int16 { + return ts.RandInt16(10) +} + +// RandAmount returns a random amount between [1e9, max). +// If max is not set, it defaults to 1000e9. +func (ts *TestSuite) RandAmount(max ...amount.Amount) amount.Amount { + maxAmt := amount.Amount(1000e9) // default max amount + if len(max) > 0 { + maxAmt = max[0] + } + + return ts.RandAmountRange(1e9, maxAmt) +} + +// RandAmountRange returns a random amount between [min, max). +func (ts *TestSuite) RandAmountRange(min, max amount.Amount) amount.Amount { + amt := amount.Amount(ts.RandInt64NonZero(int64(max - min))) + + return amt + min +} + +// RandFee returns a random fee between [1e7, max). +// If max is not set, it defaults to 1e9. +func (ts *TestSuite) RandFee(max ...amount.Amount) amount.Amount { + maxFee := amount.Amount(1e9) // default max fee + if len(max) > 0 { + maxFee = max[0] + } + + return ts.RandAmountRange(1e7, maxFee) +} + +// RandBytes returns a slice of random bytes of the given length. +func (ts *TestSuite) RandBytes(length int) []byte { + buf := make([]byte, length) + _, err := ts.Rand.Read(buf) + if err != nil { + panic(err) + } + + return buf +} + +// RandSlice generates a random non-repeating slice of int32 elements with the specified length. +func (ts *TestSuite) RandSlice(length int) []int32 { + slice := []int32{} + for { + randInt := ts.RandInt32(1000) + if !slices.Contains(slice, randInt) { + slice = append(slice, randInt) + } + + if len(slice) == length { + return slice + } + } +} + +// RandString generates a random string of the given length. +func (ts *TestSuite) RandString(length int) string { + const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + + b := make([]byte, length) + for i := range b { + b[i] = letterBytes[ts.RandInt(52)] + } + + return string(b) +} + +// DecodingHex decodes the input string from hexadecimal format and returns the resulting byte slice. +func (*TestSuite) DecodingHex(in string) []byte { + d, err := hex.DecodeString(in) + if err != nil { + panic(err) + } + + return d +} diff --git a/pkg/client/client.go b/pkg/client/client.go index f88df906..a5a3dfa6 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -4,7 +4,7 @@ import ( "context" pactus "github.com/pactus-project/pactus/www/grpc/gen/go" - "github.com/pagu-project/Pagu/pkg/log" + "github.com/pagu-project/pagu/pkg/log" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) diff --git a/pkg/client/client_mgr.go b/pkg/client/client_mgr.go index f9f76587..a89a64ab 100644 --- a/pkg/client/client_mgr.go +++ b/pkg/client/client_mgr.go @@ -9,7 +9,7 @@ import ( "github.com/pactus-project/pactus/util/logger" pactus "github.com/pactus-project/pactus/www/grpc/gen/go" - "github.com/pagu-project/Pagu/pkg/log" + "github.com/pagu-project/pagu/pkg/log" ) type Manager struct { diff --git a/pkg/log/logger.go b/pkg/log/logger.go index 4fac6375..b6a795a4 100644 --- a/pkg/log/logger.go +++ b/pkg/log/logger.go @@ -9,7 +9,7 @@ import ( "slices" "strings" - "github.com/pagu-project/Pagu/config" + "github.com/pagu-project/pagu/config" "github.com/rs/zerolog" "github.com/rs/zerolog/log" "gopkg.in/natefinch/lumberjack.v2" diff --git a/pkg/notification/mail.go b/pkg/notification/mail.go index b6c5d79a..9bce66ec 100644 --- a/pkg/notification/mail.go +++ b/pkg/notification/mail.go @@ -4,7 +4,7 @@ import ( "fmt" "html/template" - "github.com/pagu-project/Pagu/pkg/notification/zoho" + "github.com/pagu-project/pagu/pkg/notification/zoho" ) type EmailSender struct { diff --git a/pkg/utils/random_test.go b/pkg/utils/random_test.go index 9c57dd4e..bd87cbf8 100644 --- a/pkg/utils/random_test.go +++ b/pkg/utils/random_test.go @@ -3,7 +3,7 @@ package utils_test import ( "testing" - "github.com/pagu-project/Pagu/pkg/utils" + "github.com/pagu-project/pagu/pkg/utils" ) func TestRandomString(t *testing.T) { diff --git a/pkg/wallet/interface.go b/pkg/wallet/interface.go index 77db5e52..af95d659 100644 --- a/pkg/wallet/interface.go +++ b/pkg/wallet/interface.go @@ -1,6 +1,6 @@ package wallet -import "github.com/pagu-project/Pagu/pkg/amount" +import "github.com/pagu-project/pagu/pkg/amount" type IWallet interface { Balance() int64 diff --git a/pkg/wallet/mock.go b/pkg/wallet/mock.go index 558acc9d..dba0c6ad 100644 --- a/pkg/wallet/mock.go +++ b/pkg/wallet/mock.go @@ -12,7 +12,7 @@ package wallet import ( reflect "reflect" - amount "github.com/pagu-project/Pagu/pkg/amount" + amount "github.com/pagu-project/pagu/pkg/amount" gomock "go.uber.org/mock/gomock" ) diff --git a/pkg/wallet/wallet.go b/pkg/wallet/wallet.go index ad969503..a7360784 100644 --- a/pkg/wallet/wallet.go +++ b/pkg/wallet/wallet.go @@ -3,9 +3,9 @@ package wallet import ( "github.com/pactus-project/pactus/types/tx/payload" "github.com/pactus-project/pactus/wallet" - "github.com/pagu-project/Pagu/config" - "github.com/pagu-project/Pagu/pkg/amount" - "github.com/pagu-project/Pagu/pkg/log" + "github.com/pagu-project/pagu/config" + "github.com/pagu-project/pagu/pkg/amount" + "github.com/pagu-project/pagu/pkg/log" ) type Wallet struct {