mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-10 00:29:01 +02:00
1481e14c12
* add protoc gen ecode * add protobuf example
24 lines
452 B
Go
24 lines
452 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/bilibili/kratos/tool/protobuf/pkg/gen"
|
|
"github.com/bilibili/kratos/tool/protobuf/pkg/generator"
|
|
ecodegen "github.com/bilibili/kratos/tool/protobuf/protoc-gen-ecode/generator"
|
|
)
|
|
|
|
func main() {
|
|
versionFlag := flag.Bool("version", false, "print version and exit")
|
|
flag.Parse()
|
|
if *versionFlag {
|
|
fmt.Println(generator.Version)
|
|
os.Exit(0)
|
|
}
|
|
|
|
g := ecodegen.EcodeGenerator()
|
|
gen.Main(g)
|
|
}
|