From aad874e64fbebfc2dcaa7d6601c9dde5d529ba4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Sat, 10 Sep 2022 04:27:29 +0200 Subject: [PATCH] Switch to git.jochum.dev --- LICENSE.spdx | 2 +- README.md | 4 ++-- cmd/microrouterd/main.go | 8 ++++---- docker/router/Dockerfile | 2 +- go.mod | 2 +- handler.go | 6 +++--- internal/config/config.go | 2 +- internal/config/load.go | 2 +- internal/handler/handler.go | 8 ++++---- internal/proto/routerclientpb/routerclientpb.proto | 2 +- internal/proto/routerserverpb/routerserverpb.proto | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/LICENSE.spdx b/LICENSE.spdx index 896f0bf..291c05c 100644 --- a/LICENSE.spdx +++ b/LICENSE.spdx @@ -1,6 +1,6 @@ SPDXVersion: SPDX-2.1 DataLicense: CC0-1.0 Creator: René Jochum (rene@jochum.dev) -PackageName: github.com/go-micro/router +PackageName: git.jochum.dev/jo-micro/router PackageOriginator: René Jochum PackageLicenseDeclared: Apache-2.0 OR GPL-2.0-or-later \ No newline at end of file diff --git a/README.md b/README.md index 7194360..f07d22b 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,12 @@ It looks for services that host "proto/routerclientpb/routerclientpb.RouterClien ## Examples -Have a look at [internalService](https://github.com/go-micro/router/blob/master/cmd/microrouterd/main.go#L35) or the author's FOSS project [microlobby](https://github.com/pcdummy/microlobby). +Have a look at [internalService](https://git.jochum.dev/jo-micro/router/blob/master/cmd/microrouterd/main.go#L35) or the author's FOSS project [microlobby](https://github.com/pcdummy/microlobby). Here's some code from the microlobby project ```go import ( - "github.com/go-micro/router" + "git.jochum.dev/jo-micro/router" "github.com/urfave/cli/v2" "go-micro.dev/v4" "wz2100.net/microlobby/shared/proto/authservicepb/v1" diff --git a/cmd/microrouterd/main.go b/cmd/microrouterd/main.go index a801b4f..ad861e2 100644 --- a/cmd/microrouterd/main.go +++ b/cmd/microrouterd/main.go @@ -5,13 +5,13 @@ import ( "go-micro.dev/v4" "go-micro.dev/v4/logger" + "git.jochum.dev/jo-micro/router" "github.com/gin-gonic/gin" httpServer "github.com/go-micro/plugins/v4/server/http" - "github.com/go-micro/router" - "github.com/go-micro/router/internal/config" - "github.com/go-micro/router/internal/handler" - "github.com/go-micro/router/internal/proto/routerserverpb" + "git.jochum.dev/jo-micro/router/internal/config" + "git.jochum.dev/jo-micro/router/internal/handler" + "git.jochum.dev/jo-micro/router/internal/proto/routerserverpb" ) func internalService(engine *gin.Engine) { diff --git a/docker/router/Dockerfile b/docker/router/Dockerfile index 2ebc79a..a608177 100644 --- a/docker/router/Dockerfile +++ b/docker/router/Dockerfile @@ -13,7 +13,7 @@ ENV GOPATH="/go" ARG CACHEBUST=1 ARG VERSION -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -installsuffix cgo -ldflags="-w -s -X 'github.com/go-micro/router/internal/config.Version=$VERSION'" -o /usr/local/bin/microrouterd github.com/go-micro/router/cmd/microrouterd +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -installsuffix cgo -ldflags="-w -s -X 'git.jochum.dev/jo-micro/router/internal/config.Version=$VERSION'" -o /usr/local/bin/microrouterd git.jochum.dev/jo-micro/router/cmd/microrouterd # STEP 2 build a small image # start from busybox diff --git a/go.mod b/go.mod index 12d4aee..e7dc676 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/go-micro/router +module git.jochum.dev/jo-micro/router go 1.19 diff --git a/handler.go b/handler.go index f841428..03a133f 100644 --- a/handler.go +++ b/handler.go @@ -3,13 +3,13 @@ package router import ( "context" - "github.com/go-micro/router/internal/proto/routerclientpb" - "github.com/go-micro/router/internal/util" + "git.jochum.dev/jo-micro/router/internal/proto/routerclientpb" + "git.jochum.dev/jo-micro/router/internal/util" "go-micro.dev/v4/server" "google.golang.org/protobuf/types/known/emptypb" ) -// Handler is the handler for github.com/go-micro/router/proto/routerpb.RrouterService +// Handler is the handler for git.jochum.dev/jo-micro/router/proto/routerpb.RrouterService type Handler struct { routerURI string routes []*routerclientpb.RoutesReply_Route diff --git a/internal/config/config.go b/internal/config/config.go index 85f3c5d..97df851 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -6,7 +6,7 @@ var ( const ( Name = "go.micro.router" - PkgPath = "github.com/go-micro/router" + PkgPath = "git.jochum.dev/jo-micro/router" ) const ( diff --git a/internal/config/load.go b/internal/config/load.go index 765d6d7..661316b 100644 --- a/internal/config/load.go +++ b/internal/config/load.go @@ -4,9 +4,9 @@ import ( "os" "strings" + "git.jochum.dev/jo-micro/router/internal/util" "github.com/go-micro/plugins/v4/config/encoder/toml" "github.com/go-micro/plugins/v4/config/encoder/yaml" - "github.com/go-micro/router/internal/util" "github.com/pkg/errors" "go-micro.dev/v4/config" "go-micro.dev/v4/config/reader" diff --git a/internal/handler/handler.go b/internal/handler/handler.go index 2a46335..994ecca 100644 --- a/internal/handler/handler.go +++ b/internal/handler/handler.go @@ -9,11 +9,11 @@ import ( "net/http" "time" + "git.jochum.dev/jo-micro/router/internal/config" + "git.jochum.dev/jo-micro/router/internal/proto/routerclientpb" + "git.jochum.dev/jo-micro/router/internal/proto/routerserverpb" + "git.jochum.dev/jo-micro/router/internal/util" "github.com/gin-gonic/gin" - "github.com/go-micro/router/internal/config" - "github.com/go-micro/router/internal/proto/routerclientpb" - "github.com/go-micro/router/internal/proto/routerserverpb" - "github.com/go-micro/router/internal/util" "go-micro.dev/v4" "go-micro.dev/v4/client" "go-micro.dev/v4/errors" diff --git a/internal/proto/routerclientpb/routerclientpb.proto b/internal/proto/routerclientpb/routerclientpb.proto index f23dbe2..3e4a15d 100644 --- a/internal/proto/routerclientpb/routerclientpb.proto +++ b/internal/proto/routerclientpb/routerclientpb.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package routerclientpb; -option go_package = "github.com/go-micro/router/proto/routerclientpb;routerclientpb"; +option go_package = "git.jochum.dev/jo-micro/router/proto/routerclientpb;routerclientpb"; import "google/protobuf/empty.proto"; diff --git a/internal/proto/routerserverpb/routerserverpb.proto b/internal/proto/routerserverpb/routerserverpb.proto index 9685d17..b474ecb 100644 --- a/internal/proto/routerserverpb/routerserverpb.proto +++ b/internal/proto/routerserverpb/routerserverpb.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package routerserverpb; -option go_package = "github.com/go-micro/router/proto/routerserverpb;routerserverpb"; +option go_package = "git.jochum.dev/jo-micro/router/proto/routerserverpb;routerserverpb"; import "google/protobuf/empty.proto";