diff --git a/README.md b/README.md index 9cb68ef..6706ae4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # Atomctl 脚手架工具命令指南 +## Install + +``` +go install go.ipao.vip/atomctl@latest +``` + ## 命令列表 ### 生成命令 diff --git a/cmd/gen_enum.go b/cmd/gen_enum.go index 1f5ae0e..6898598 100644 --- a/cmd/gen_enum.go +++ b/cmd/gen_enum.go @@ -8,8 +8,8 @@ import ( "path/filepath" "strings" - "git.ipao.vip/rogeecn/atomctl/pkg/utils" - "git.ipao.vip/rogeecn/atomctl/pkg/utils/generator" + "go.ipao.vip/atomctl/pkg/utils" + "go.ipao.vip/atomctl/pkg/utils/generator" _ "github.com/lib/pq" "github.com/spf13/cobra" ) diff --git a/cmd/gen_model.go b/cmd/gen_model.go index 719f37a..86ed551 100644 --- a/cmd/gen_model.go +++ b/cmd/gen_model.go @@ -6,8 +6,8 @@ import ( "regexp" "strings" - pgDatabase "git.ipao.vip/rogeecn/atomctl/pkg/postgres" - "git.ipao.vip/rogeecn/atomctl/pkg/utils/gomod" + pgDatabase "go.ipao.vip/atomctl/pkg/postgres" + "go.ipao.vip/atomctl/pkg/utils/gomod" "github.com/go-jet/jet/v2/generator/metadata" "github.com/go-jet/jet/v2/generator/postgres" "github.com/go-jet/jet/v2/generator/template" diff --git a/cmd/gen_provider.go b/cmd/gen_provider.go index 00148e7..4413418 100644 --- a/cmd/gen_provider.go +++ b/cmd/gen_provider.go @@ -6,8 +6,8 @@ import ( "path/filepath" "strings" - "git.ipao.vip/rogeecn/atomctl/pkg/ast/provider" - "git.ipao.vip/rogeecn/atomctl/pkg/utils/gomod" + "go.ipao.vip/atomctl/pkg/ast/provider" + "go.ipao.vip/atomctl/pkg/utils/gomod" "github.com/samber/lo" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/gen_route.go b/cmd/gen_route.go index df7d576..9dcd390 100644 --- a/cmd/gen_route.go +++ b/cmd/gen_route.go @@ -6,8 +6,8 @@ import ( "path/filepath" "regexp" - "git.ipao.vip/rogeecn/atomctl/pkg/ast/route" - "git.ipao.vip/rogeecn/atomctl/pkg/utils/gomod" + "go.ipao.vip/atomctl/pkg/ast/route" + "go.ipao.vip/atomctl/pkg/utils/gomod" "github.com/samber/lo" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" @@ -24,7 +24,7 @@ func CommandGenRoute(root *cobra.Command) { root.AddCommand(cmd) } -// https://git.ipao.vip/rogeecn/atomctl/pkg/swag?tab=readme-ov-file#api-operation +// https://go.ipao.vip/atomctl/pkg/swag?tab=readme-ov-file#api-operation func commandGenRouteE(cmd *cobra.Command, args []string) error { var err error var path string diff --git a/cmd/migrate.go b/cmd/migrate.go index dfd6bcd..6cc2216 100644 --- a/cmd/migrate.go +++ b/cmd/migrate.go @@ -3,7 +3,7 @@ package cmd import ( "context" - "git.ipao.vip/rogeecn/atomctl/pkg/postgres" + "go.ipao.vip/atomctl/pkg/postgres" "github.com/pkg/errors" "github.com/pressly/goose/v3" "github.com/samber/lo" diff --git a/cmd/new_event.go b/cmd/new_event.go index 45caa74..06e2f1d 100644 --- a/cmd/new_event.go +++ b/cmd/new_event.go @@ -7,8 +7,8 @@ import ( "path/filepath" "text/template" - "git.ipao.vip/rogeecn/atomctl/pkg/utils/gomod" - "git.ipao.vip/rogeecn/atomctl/templates" + "go.ipao.vip/atomctl/pkg/utils/gomod" + "go.ipao.vip/atomctl/templates" "github.com/samber/lo" "github.com/spf13/cobra" ) diff --git a/cmd/new_job.go b/cmd/new_job.go index d10ab8c..c7c54b6 100644 --- a/cmd/new_job.go +++ b/cmd/new_job.go @@ -7,8 +7,8 @@ import ( "path/filepath" "text/template" - "git.ipao.vip/rogeecn/atomctl/pkg/utils/gomod" - "git.ipao.vip/rogeecn/atomctl/templates" + "go.ipao.vip/atomctl/pkg/utils/gomod" + "go.ipao.vip/atomctl/templates" "github.com/samber/lo" "github.com/spf13/cobra" ) diff --git a/cmd/new_module.go b/cmd/new_module.go index b6dddf1..1dcb4fe 100644 --- a/cmd/new_module.go +++ b/cmd/new_module.go @@ -9,8 +9,8 @@ import ( "strings" "text/template" - "git.ipao.vip/rogeecn/atomctl/pkg/utils/gomod" - "git.ipao.vip/rogeecn/atomctl/templates" + "go.ipao.vip/atomctl/pkg/utils/gomod" + "go.ipao.vip/atomctl/templates" "github.com/samber/lo" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/new_project.go b/cmd/new_project.go index bc98416..4658839 100644 --- a/cmd/new_project.go +++ b/cmd/new_project.go @@ -9,7 +9,7 @@ import ( "strings" "text/template" - "git.ipao.vip/rogeecn/atomctl/templates" + "go.ipao.vip/atomctl/templates" "github.com/pkg/errors" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/new_provider.go b/cmd/new_provider.go index 044de49..b2c1a8a 100644 --- a/cmd/new_provider.go +++ b/cmd/new_provider.go @@ -9,7 +9,7 @@ import ( "strings" "text/template" - "git.ipao.vip/rogeecn/atomctl/templates" + "go.ipao.vip/atomctl/templates" "github.com/iancoleman/strcase" "github.com/spf13/cobra" ) diff --git a/go.mod b/go.mod index 004038c..3c37edd 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git.ipao.vip/rogeecn/atomctl +module go.ipao.vip/atomctl go 1.23.2 diff --git a/main.go b/main.go index 8bc9be7..be8a3d4 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "git.ipao.vip/rogeecn/atomctl/cmd" + "go.ipao.vip/atomctl/cmd" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) diff --git a/pkg/ast/provider/provider.go b/pkg/ast/provider/provider.go index d925ee3..3cedda6 100644 --- a/pkg/ast/provider/provider.go +++ b/pkg/ast/provider/provider.go @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - "git.ipao.vip/rogeecn/atomctl/pkg/utils/gomod" + "go.ipao.vip/atomctl/pkg/utils/gomod" "github.com/samber/lo" log "github.com/sirupsen/logrus" ) diff --git a/pkg/ast/provider/render.go b/pkg/ast/provider/render.go index 22c8536..f2296bb 100644 --- a/pkg/ast/provider/render.go +++ b/pkg/ast/provider/render.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "git.ipao.vip/rogeecn/atomctl/pkg/utils/gomod" + "go.ipao.vip/atomctl/pkg/utils/gomod" "github.com/samber/lo" "golang.org/x/tools/imports" ) diff --git a/pkg/ast/route/render.go b/pkg/ast/route/render.go index 9660896..90cd156 100644 --- a/pkg/ast/route/render.go +++ b/pkg/ast/route/render.go @@ -8,7 +8,7 @@ import ( "path/filepath" "text/template" - "git.ipao.vip/rogeecn/atomctl/pkg/utils/gomod" + "go.ipao.vip/atomctl/pkg/utils/gomod" "github.com/Masterminds/sprig/v3" "github.com/iancoleman/strcase" "github.com/samber/lo" diff --git a/pkg/ast/route/route.go b/pkg/ast/route/route.go index a1dd31f..9bc0f1f 100644 --- a/pkg/ast/route/route.go +++ b/pkg/ast/route/route.go @@ -7,7 +7,7 @@ import ( "go/token" "strings" - "git.ipao.vip/rogeecn/atomctl/pkg/utils/gomod" + "go.ipao.vip/atomctl/pkg/utils/gomod" "github.com/pkg/errors" "github.com/samber/lo" log "github.com/sirupsen/logrus" diff --git a/pkg/ast/route/router.go.tpl b/pkg/ast/route/router.go.tpl index 6e96ee4..124fef9 100644 --- a/pkg/ast/route/router.go.tpl +++ b/pkg/ast/route/router.go.tpl @@ -8,8 +8,8 @@ import ( {{- end }} . "{{.ProjectPackage}}/pkg/f" - _ "git.ipao.vip/rogeecn/atom" - _ "git.ipao.vip/rogeecn/atom/contracts" + _ "go.ipao.vip/atom" + _ "go.ipao.vip/atom/contracts" "github.com/gofiber/fiber/v3" log "github.com/sirupsen/logrus" ) diff --git a/templates/project/.gitea/workflows/build.yml.raw b/templates/project/.gitea/workflows/build.yml.raw index 7adb683..7de4b1d 100644 --- a/templates/project/.gitea/workflows/build.yml.raw +++ b/templates/project/.gitea/workflows/build.yml.raw @@ -39,4 +39,4 @@ jobs: - name: Build final Docker image run: | docker login -u ${{ secrets.DOCKER_AF_USERNAME }} -p ${{ secrets.DOCKER_AF_PASSWORD }} docker-af.hub.ipao.vip - docker build --push -t docker-af.hub.ipao.vip/rogeecn/qvyun:latest . + docker build --push -t docker-af.hub.ipao.vip/rogeecn/test:latest .