mirror of
https://github.com/go-micro/go-micro.git
synced 2025-08-04 21:42:57 +02:00
rename to go-micro.dev
This commit is contained in:
@@ -9,7 +9,7 @@ Gomu is a helper tool for developing [Go Micro][1] projects.
|
|||||||
Installation is done by using the [`go install`][3] command.
|
Installation is done by using the [`go install`][3] command.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go install github.com/asim/go-micro/cmd/gomu@latest
|
go install go-micro.dev/cmd/gomu@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Let's create a new service using the `new` command.
|
Let's create a new service using the `new` command.
|
||||||
@@ -48,7 +48,7 @@ You will need protoc-gen-micro for code generation
|
|||||||
# https://github.com/protocolbuffers/protobuf/releases
|
# https://github.com/protocolbuffers/protobuf/releases
|
||||||
go get -u google.golang.org/protobuf/proto
|
go get -u google.golang.org/protobuf/proto
|
||||||
go install github.com/golang/protobuf/protoc-gen-go@latest
|
go install github.com/golang/protobuf/protoc-gen-go@latest
|
||||||
go install github.com/asim/go-micro/cmd/protoc-gen-micro/v3@latest
|
go install go-micro.dev/cmd/protoc-gen-micro/v4@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
## Creating A Service
|
## Creating A Service
|
||||||
@@ -67,7 +67,7 @@ download protobuf for go-micro:
|
|||||||
|
|
||||||
go get -u google.golang.org/protobuf/proto
|
go get -u google.golang.org/protobuf/proto
|
||||||
go install github.com/golang/protobuf/protoc-gen-go@latest
|
go install github.com/golang/protobuf/protoc-gen-go@latest
|
||||||
go install github.com/asim/go-micro/cmd/protoc-gen-micro/v3@latest
|
go install go-micro.dev/cmd/protoc-gen-micro/v4@latest
|
||||||
|
|
||||||
compile the proto file helloworld.proto:
|
compile the proto file helloworld.proto:
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ download protobuf for go-micro:
|
|||||||
|
|
||||||
go get -u google.golang.org/protobuf/proto
|
go get -u google.golang.org/protobuf/proto
|
||||||
go install github.com/golang/protobuf/protoc-gen-go@latest
|
go install github.com/golang/protobuf/protoc-gen-go@latest
|
||||||
go install github.com/asim/go-micro/cmd/protoc-gen-micro/v3@latest
|
go install go-micro.dev/cmd/protoc-gen-micro/v4@latest
|
||||||
|
|
||||||
compile the proto file helloworld.proto:
|
compile the proto file helloworld.proto:
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/asim/go-micro/cmd/gomu/debug/trace"
|
"go-micro.dev/cmd/gomu/debug/trace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Greet(ctx context.Context, name string) string {
|
func Greet(ctx context.Context, name string) string {
|
||||||
@@ -377,12 +377,12 @@ $ gomu stream bidi helloworld Helloworld.BidiStream '{"stroke": 1}' '{"stroke":
|
|||||||
|
|
||||||
This software is published under the [MIT license][10].
|
This software is published under the [MIT license][10].
|
||||||
|
|
||||||
[1]: https://github.com/asim/go-micro
|
[1]: https://go-micro.dev
|
||||||
[2]: https://golang.org/dl/
|
[2]: https://golang.org/dl/
|
||||||
[3]: https://golang.org/cmd/go/#hdr-Compile_and_install_packages_and_dependencies
|
[3]: https://golang.org/cmd/go/#hdr-Compile_and_install_packages_and_dependencies
|
||||||
[4]: https://grpc.io/docs/protoc-installation/
|
[4]: https://grpc.io/docs/protoc-installation/
|
||||||
[5]: https://micro.mu/github.com/golang/protobuf/protoc-gen-go
|
[5]: https://micro.mu/github.com/golang/protobuf/protoc-gen-go
|
||||||
[6]: https://github.com/asim/go-micro/tree/master/cmd/protoc-gen-micro
|
[6]: https://go-micro.dev/tree/master/cmd/protoc-gen-micro
|
||||||
[7]: https://www.jaegertracing.io/
|
[7]: https://www.jaegertracing.io/
|
||||||
[8]: https://github.com/jaegertracing/jaeger-client-go#environment-variables
|
[8]: https://github.com/jaegertracing/jaeger-client-go#environment-variables
|
||||||
[9]: https://skaffold.dev/
|
[9]: https://skaffold.dev/
|
||||||
|
@@ -6,7 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/asim/go-micro/cmd/gomu/cmd"
|
"go-micro.dev/cmd/gomu/cmd"
|
||||||
"go-micro.dev/v4"
|
"go-micro.dev/v4"
|
||||||
"go-micro.dev/v4/client"
|
"go-micro.dev/v4/client"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
package cli
|
package cli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
_ "github.com/asim/go-micro/cmd/gomu/cmd/cli/call"
|
_ "go-micro.dev/cmd/gomu/cmd/cli/call"
|
||||||
_ "github.com/asim/go-micro/cmd/gomu/cmd/cli/describe"
|
_ "go-micro.dev/cmd/gomu/cmd/cli/describe"
|
||||||
_ "github.com/asim/go-micro/cmd/gomu/cmd/cli/generate"
|
_ "go-micro.dev/cmd/gomu/cmd/cli/generate"
|
||||||
_ "github.com/asim/go-micro/cmd/gomu/cmd/cli/new"
|
_ "go-micro.dev/cmd/gomu/cmd/cli/new"
|
||||||
_ "github.com/asim/go-micro/cmd/gomu/cmd/cli/run"
|
_ "go-micro.dev/cmd/gomu/cmd/cli/run"
|
||||||
_ "github.com/asim/go-micro/cmd/gomu/cmd/cli/services"
|
_ "go-micro.dev/cmd/gomu/cmd/cli/services"
|
||||||
_ "github.com/asim/go-micro/cmd/gomu/cmd/cli/stream"
|
_ "go-micro.dev/cmd/gomu/cmd/cli/stream"
|
||||||
)
|
)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
package describe
|
package describe
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/asim/go-micro/cmd/gomu/cmd"
|
"go-micro.dev/cmd/gomu/cmd"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/asim/go-micro/cmd/gomu/cmd"
|
"go-micro.dev/cmd/gomu/cmd"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
)
|
)
|
||||||
|
@@ -6,9 +6,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/asim/go-micro/cmd/gomu/cmd"
|
"go-micro.dev/cmd/gomu/cmd"
|
||||||
"github.com/asim/go-micro/cmd/gomu/generator"
|
"go-micro.dev/cmd/gomu/generator"
|
||||||
tmpl "github.com/asim/go-micro/cmd/gomu/generator/template"
|
tmpl "go-micro.dev/cmd/gomu/generator/template"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -6,9 +6,9 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/asim/go-micro/cmd/gomu/cmd"
|
"go-micro.dev/cmd/gomu/cmd"
|
||||||
"github.com/asim/go-micro/cmd/gomu/generator"
|
"go-micro.dev/cmd/gomu/generator"
|
||||||
tmpl "github.com/asim/go-micro/cmd/gomu/generator/template"
|
tmpl "go-micro.dev/cmd/gomu/generator/template"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ func protoComments(name, dir string) []string {
|
|||||||
"\ndownload protobuf for go-micro:\n",
|
"\ndownload protobuf for go-micro:\n",
|
||||||
"go get -u google.golang.org/protobuf/proto",
|
"go get -u google.golang.org/protobuf/proto",
|
||||||
"go install github.com/golang/protobuf/protoc-gen-go@latest",
|
"go install github.com/golang/protobuf/protoc-gen-go@latest",
|
||||||
"go install github.com/asim/go-micro/cmd/protoc-gen-micro/v3@latest",
|
"go install github.com/asim/go-micro/cmd/protoc-gen-micro/v4@latest",
|
||||||
"\ncompile the proto file " + name + ".proto:\n",
|
"\ncompile the proto file " + name + ".proto:\n",
|
||||||
"cd " + dir,
|
"cd " + dir,
|
||||||
"make proto tidy\n",
|
"make proto tidy\n",
|
||||||
|
@@ -7,7 +7,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/asim/go-micro/cmd/gomu/cmd"
|
"go-micro.dev/cmd/gomu/cmd"
|
||||||
"go-micro.dev/v4/runtime"
|
"go-micro.dev/v4/runtime"
|
||||||
"go-micro.dev/v4/runtime/local/git"
|
"go-micro.dev/v4/runtime/local/git"
|
||||||
"github.com/fsnotify/fsnotify"
|
"github.com/fsnotify/fsnotify"
|
||||||
|
@@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/asim/go-micro/cmd/gomu/cmd"
|
"go-micro.dev/cmd/gomu/cmd"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
package stream
|
package stream
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/asim/go-micro/cmd/gomu/cmd"
|
"go-micro.dev/cmd/gomu/cmd"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ import (
|
|||||||
{{end}} "go-micro.dev/v4"
|
{{end}} "go-micro.dev/v4"
|
||||||
log "go-micro.dev/v4/logger"{{if .Jaeger}}
|
log "go-micro.dev/v4/logger"{{if .Jaeger}}
|
||||||
|
|
||||||
"github.com/asim/go-micro/cmd/gomu/debug/trace/jaeger"{{end}}
|
"go-micro.dev/cmd/gomu/debug/trace/jaeger"{{end}}
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -102,7 +102,7 @@ import (
|
|||||||
{{end}} "go-micro.dev/v4"
|
{{end}} "go-micro.dev/v4"
|
||||||
log "go-micro.dev/v4/logger"{{if .Jaeger}}
|
log "go-micro.dev/v4/logger"{{if .Jaeger}}
|
||||||
|
|
||||||
"github.com/asim/go-micro/cmd/gomu/debug/trace/jaeger"{{end}}
|
"go-micro.dev/cmd/gomu/debug/trace/jaeger"{{end}}
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@@ -7,7 +7,7 @@ var Makefile = `GOPATH:=$(shell go env GOPATH)
|
|||||||
init:
|
init:
|
||||||
@go get -u google.golang.org/protobuf/proto
|
@go get -u google.golang.org/protobuf/proto
|
||||||
@go install github.com/golang/protobuf/protoc-gen-go@latest
|
@go install github.com/golang/protobuf/protoc-gen-go@latest
|
||||||
@go install github.com/asim/go-micro/cmd/protoc-gen-micro/v3@latest
|
@go install github.com/asim/go-micro/cmd/protoc-gen-micro/v4@latest
|
||||||
|
|
||||||
.PHONY: proto
|
.PHONY: proto
|
||||||
proto:
|
proto:
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
module github.com/asim/go-micro/cmd/gomu
|
module go-micro.dev/cmd/gomu
|
||||||
|
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/asim/go-micro/cmd/gomu/cmd"
|
"go-micro.dev/cmd/gomu/cmd"
|
||||||
|
|
||||||
// register commands
|
// register commands
|
||||||
_ "github.com/asim/go-micro/cmd/gomu/cmd/cli"
|
_ "go-micro.dev/cmd/gomu/cmd/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
Reference in New Issue
Block a user