Skip to content

Commit

Permalink
replace domain name
Browse files Browse the repository at this point in the history
  • Loading branch information
kid551 committed Apr 11, 2024
1 parent 255bb7d commit c60d7c3
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 43 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p align="center">
适配各种基础设施的微服务框架,搭配 <a href="https://github.com/google/wire">wire</a> 依赖注入模式可写出更简洁和安全的代码。
<br />
<a href="https://github.com/xieziyu/go-coco"><strong>Explore »</strong></a>
<a href="https://github.com/iftechio/go-coco"><strong>Explore »</strong></a>
<br />
</p>
</div>
Expand Down Expand Up @@ -47,7 +47,7 @@
### Installation

```sh
go get github.com/xieziyu/go-coco@latest
go get github.com/iftechio/go-coco@latest
```

### App
Expand Down Expand Up @@ -118,7 +118,7 @@ go-coco 提供了便捷的 cli 工具用于快速生成一个基于 wire 的微
### CLI Installation

```sh
go install github.com/xieziyu/go-coco@latest
go install github.com/iftechio/go-coco@latest
```

### Dependencies
Expand Down Expand Up @@ -159,8 +159,8 @@ Flags:


<!-- MARKDOWN LINKS & IMAGES -->
[ci-badge]: https://github.com/xieziyu/go-coco/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/xieziyu/go-coco/actions/workflows/ci.yml
[ci-badge]: https://github.com/iftechio/go-coco/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/iftechio/go-coco/actions/workflows/ci.yml
[buf]: https://docs.buf.build/installation
[wire]: https://github.com/google/wire
[coco-example]: ./docs/coco.svg
2 changes: 1 addition & 1 deletion app/looper/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"syscall"
"time"

"github.com/iftechio/go-coco/utils/logger"
"github.com/pkg/errors"
"github.com/xieziyu/go-coco/utils/logger"
)

// 分布式锁
Expand Down
6 changes: 3 additions & 3 deletions app/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"os/signal"
"syscall"

"github.com/xieziyu/go-coco/infra"
"github.com/xieziyu/go-coco/utils/logger"
"github.com/xieziyu/go-coco/utils/sync/errgroup"
"github.com/iftechio/go-coco/infra"
"github.com/iftechio/go-coco/utils/logger"
"github.com/iftechio/go-coco/utils/sync/errgroup"
)

type Manager struct {
Expand Down
2 changes: 1 addition & 1 deletion app/server/profile/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/google/gops/agent"
xLogger "github.com/xieziyu/go-coco/utils/logger"
xLogger "github.com/iftechio/go-coco/utils/logger"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/server/xecho/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"net/http"

"github.com/go-playground/validator/v10"
xLogger "github.com/iftechio/go-coco/utils/logger"
"github.com/labstack/echo/v4"
"github.com/pkg/errors"
xLogger "github.com/xieziyu/go-coco/utils/logger"
)

type Server struct {
Expand Down
4 changes: 2 additions & 2 deletions app/server/xecho/errorhandle.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (

"github.com/getsentry/sentry-go"
"github.com/go-playground/validator/v10"
"github.com/iftechio/go-coco/app/server/custom"
xLogger "github.com/iftechio/go-coco/utils/logger"
"github.com/labstack/echo/v4"
"github.com/pkg/errors"
"github.com/xieziyu/go-coco/app/server/custom"
xLogger "github.com/xieziyu/go-coco/utils/logger"
)

func asHTTPError(err error) (*echo.HTTPError, bool) {
Expand Down
4 changes: 2 additions & 2 deletions app/server/xecho/errorhandle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/labstack/echo/v4"
"github.com/stretchr/testify/assert"

"github.com/xieziyu/go-coco/app/server/custom"
"github.com/xieziyu/go-coco/app/server/xecho/middleware"
"github.com/iftechio/go-coco/app/server/custom"
"github.com/iftechio/go-coco/app/server/xecho/middleware"
)

func Test_handleError(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/server/xecho/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"io"
"os"

xLogger "github.com/iftechio/go-coco/utils/logger"
"github.com/labstack/echo/v4"
"github.com/labstack/gommon/log"
xLogger "github.com/xieziyu/go-coco/utils/logger"
)

type logger struct{}
Expand Down
4 changes: 2 additions & 2 deletions app/server/xgrpc/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"context"

"github.com/getsentry/sentry-go"
xLogger "github.com/iftechio/go-coco/utils/logger"
"github.com/pkg/errors"
xLogger "github.com/xieziyu/go-coco/utils/logger"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/xieziyu/go-coco/app/server/custom"
"github.com/iftechio/go-coco/app/server/custom"
)

func asCustomError(err error) (*custom.Error, bool) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os/exec"
"path"

"github.com/xieziyu/go-coco/cmd/tpl"
"github.com/iftechio/go-coco/cmd/tpl"
)

type SvcApps struct {
Expand Down Expand Up @@ -57,8 +57,8 @@ var protoMods = []string{
}

var requiredMods = []string{
"github.com/xieziyu/go-coco",
"github.com/xieziyu/go-coco/utils/logger",
"github.com/iftechio/go-coco",
"github.com/iftechio/go-coco/utils/logger",
"github.com/google/wire",
"go.uber.org/automaxprocs",
}
Expand Down
20 changes: 10 additions & 10 deletions cmd/tpl/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import (
{{- if .WithProto }}
"{{ .PkgName }}/internal/proto/public"
{{- end }}
_ "github.com/xieziyu/go-coco/app/server/profile"
"github.com/xieziyu/go-coco/app/server/xecho"
"github.com/xieziyu/go-coco/app/server/xecho/middleware"
_ "github.com/iftechio/go-coco/app/server/profile"
"github.com/iftechio/go-coco/app/server/xecho"
"github.com/iftechio/go-coco/app/server/xecho/middleware"
{{- if .WithProto }}
"github.com/xieziyu/go-coco/app/server/xgrpc"
"github.com/iftechio/go-coco/app/server/xgrpc"
{{- end }}
logger "github.com/xieziyu/go-coco/utils/logger"
logger "github.com/iftechio/go-coco/utils/logger"
)
type Server struct {
Expand Down Expand Up @@ -110,7 +110,7 @@ func AppGrpc() string {
import (
"{{ .PkgName }}/internal/config"
"github.com/xieziyu/go-coco/app/server/xgrpc"
"github.com/iftechio/go-coco/app/server/xgrpc"
{{- if .WithProto }}
"{{ .PkgName }}/internal/grpc/public"
{{- end }}
Expand Down Expand Up @@ -166,7 +166,7 @@ import (
"github.com/getsentry/sentry-go"
{{- end }}
"{{ .PkgName }}/internal/config"
logger "github.com/xieziyu/go-coco/utils/logger"
logger "github.com/iftechio/go-coco/utils/logger"
)
type Jobs struct {
Expand Down Expand Up @@ -215,9 +215,9 @@ import (
"{{ .PkgName }}/internal/config"
"{{ .PkgName }}/internal/infra"
"github.com/xieziyu/go-coco/app/looper"
"github.com/xieziyu/go-coco/utils/sync/errgroup"
logger "github.com/xieziyu/go-coco/utils/logger"
"github.com/iftechio/go-coco/app/looper"
"github.com/iftechio/go-coco/utils/sync/errgroup"
logger "github.com/iftechio/go-coco/utils/logger"
)
type Jobs struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/tpl/infra.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ func InfraSentry() string {
import (
"github.com/getsentry/sentry-go"
"{{ .PkgName }}/internal/config"
"github.com/xieziyu/go-coco/infra"
"github.com/iftechio/go-coco/infra"
)
type Sentry = infra.Sentry
Expand All @@ -26,7 +26,7 @@ func InfraMongo() string {
import (
"{{ .PkgName }}/internal/config"
"github.com/xieziyu/go-coco/infra"
"github.com/iftechio/go-coco/infra"
"go.mongodb.org/mongo-driver/mongo"
)
Expand Down Expand Up @@ -57,7 +57,7 @@ func InfraRedis() string {
import (
"{{ .PkgName }}/internal/config"
"github.com/xieziyu/go-coco/infra"
"github.com/iftechio/go-coco/infra"
)
type Redis struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/tpl/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func MainGo() string {
import (
_ "go.uber.org/automaxprocs"
logger "github.com/xieziyu/go-coco/utils/logger"
logger "github.com/iftechio/go-coco/utils/logger"
)
func main() {
Expand Down Expand Up @@ -129,7 +129,7 @@ import (
{{- if .Apps.Looper }}
"{{ .PkgName }}/internal/looper"
{{- end }}
"github.com/xieziyu/go-coco/app"
"github.com/iftechio/go-coco/app"
)
// AppManager is the manager of all the applications
Expand Down Expand Up @@ -236,7 +236,7 @@ func ConfigGo() string {
import (
_ "embed" // embed config toml
"github.com/xieziyu/go-coco/config"
"github.com/iftechio/go-coco/config"
)
//go:embed config.toml
Expand Down
2 changes: 1 addition & 1 deletion cmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var upgradeCmd = &cobra.Command{
Long: `Install latest version of go-coco`,
Run: func(cmd *cobra.Command, args []string) {
report(flagSuccess, "upgrading...")
err := exec.Command("go", "install", "github.com/xieziyu/go-coco@latest").Run()
err := exec.Command("go", "install", "github.com/iftechio/go-coco@latest").Run()
report(flagSuccess, "done")
cobra.CheckErr(err)
},
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// module github.com/xieziyu/go-coco
module github.com/xieziyu/go-coco
module github.com/iftechio/go-coco

go 1.18

Expand Down
2 changes: 1 addition & 1 deletion infra/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"

"github.com/go-pg/pg/v10"
"github.com/iftechio/go-coco/utils/logger"
"github.com/pkg/errors"
"github.com/xieziyu/go-coco/utils/logger"
)

type Postgres struct {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"os"

"github.com/xieziyu/go-coco/cmd"
"github.com/iftechio/go-coco/cmd"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion utils/sync/errgroup/errgroup_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package errgroup_test
import (
"context"

"github.com/xieziyu/go-coco/utils/sync/errgroup"
"github.com/iftechio/go-coco/utils/sync/errgroup"
)

var job = func(ctx context.Context) error { return nil }
Expand Down

0 comments on commit c60d7c3

Please sign in to comment.