diff --git a/README.md b/README.md index 2cd9670..b702bf5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# `protoc-gen-micro` +# `protoc-gen-go-micro` protobuf plugin to generate helper code for micro framework A generic **code**/script/data generator based on [Protobuf](https://developers.google.com/protocol-buffers/). @@ -23,4 +23,4 @@ $> protoc --micro_out=debug=true,components="micro|http":. input.proto * Install the **go** compiler and tools from https://golang.org/doc/install * Install **protoc-gen-go**: `go get google.golang.org/protobuf/cmd/protoc-gen-go` -* Install **protoc-gen-micro**: `go get github.com/unistack-org/protoc-gen-micro/v3` +* Install **protoc-gen-go-micro**: `go get github.com/unistack-org/protoc-gen-go-micro/v3` diff --git a/chi.go b/chi.go index 55b664c..bf7ddf9 100644 --- a/chi.go +++ b/chi.go @@ -30,7 +30,8 @@ func (g *Generator) chiGenerate(component string, plugin *protogen.Plugin) error } gfile := plugin.NewGeneratedFile(gname, path) - gfile.P("// Code generated by protoc-gen-micro") + gfile.P("// Code generated by protoc-gen-go-micro. DO NOT EDIT.") + gfile.P("// protoc-gen-go-micro version: " + versionComment) gfile.P("package ", file.GoPackageName) gfile.P() diff --git a/example/example.proto b/example/example.proto index 01963e9..72213f3 100644 --- a/example/example.proto +++ b/example/example.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package example; -option go_package = "github.com/unistack-org/protoc-gen-micro/v3/example;examplepb"; +option go_package = "github.com/unistack-org/protoc-gen-go-micro/v3/example;examplepb"; import "tag/tag.proto"; import "api/annotations.proto"; diff --git a/go.mod b/go.mod index 57a6e5f..80b73a5 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/unistack-org/protoc-gen-micro/v3 +module github.com/unistack-org/protoc-gen-go-micro/v3 go 1.16 diff --git a/gorilla.go b/gorilla.go index c671612..5b812ca 100644 --- a/gorilla.go +++ b/gorilla.go @@ -30,7 +30,8 @@ func (g *Generator) gorillaGenerate(component string, plugin *protogen.Plugin) e } gfile := plugin.NewGeneratedFile(gname, path) - gfile.P("// Code generated by protoc-gen-micro") + gfile.P("// Code generated by protoc-gen-go-micro. DO NOT EDIT.") + gfile.P("// protoc-gen-go-micro version: " + versionComment) gfile.P("package ", file.GoPackageName) gfile.P() diff --git a/http.go b/http.go index 4ddf7c7..2e992b3 100644 --- a/http.go +++ b/http.go @@ -20,7 +20,8 @@ func (g *Generator) httpGenerate(component string, plugin *protogen.Plugin, genC } gfile := plugin.NewGeneratedFile(gname, path) - gfile.P("// Code generated by protoc-gen-micro") + gfile.P("// Code generated by protoc-gen-go-micro. DO NOT EDIT.") + gfile.P("// protoc-gen-go-micro version: " + versionComment) gfile.P("// source: ", file.Proto.GetName()) gfile.P("package ", file.GoPackageName) gfile.P() diff --git a/micro.go b/micro.go index fc6edee..1235978 100644 --- a/micro.go +++ b/micro.go @@ -21,7 +21,8 @@ func (g *Generator) microGenerate(component string, plugin *protogen.Plugin, gen } gfile := plugin.NewGeneratedFile(gname, path) - gfile.P("// Code generated by protoc-gen-micro") + gfile.P("// Code generated by protoc-gen-go-micro. DO NOT EDIT.") + gfile.P("// protoc-gen-go-micro version: " + versionComment) gfile.P("// source: ", file.Proto.GetName()) gfile.P("package ", file.GoPackageName) gfile.P() diff --git a/rpc.go b/rpc.go index ae58ad4..3143249 100644 --- a/rpc.go +++ b/rpc.go @@ -20,7 +20,8 @@ func (g *Generator) rpcGenerate(component string, plugin *protogen.Plugin, genCl } gfile := plugin.NewGeneratedFile(gname, path) - gfile.P("// Code generated by protoc-gen-micro") + gfile.P("// Code generated by protoc-gen-go-micro. DO NOT EDIT.") + gfile.P("// protoc-gen-go-micro version: " + versionComment) gfile.P("// source: ", file.Proto.GetName()) gfile.P("package ", file.GoPackageName) gfile.P() diff --git a/variables.go b/variables.go index 02b674c..54e597d 100644 --- a/variables.go +++ b/variables.go @@ -17,4 +17,5 @@ var ( microClientHttpPackage = protogen.GoImportPath("github.com/unistack-org/micro-client-http/v3") timePackage = protogen.GoImportPath("time") deprecationComment = "// Deprecated: Do not use." + versionComment = "v3.3.6" )