mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-24 03:46:37 +02:00
e5fe1e4f63
* add cross-platform protoc * add protobuf generator
24 lines
440 B
Go
24 lines
440 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/bilibili/kratos/tool/protobuf/pkg/gen"
|
|
"github.com/bilibili/kratos/tool/protobuf/pkg/generator"
|
|
bmgen "github.com/bilibili/kratos/tool/protobuf/protoc-gen-bm/generator"
|
|
)
|
|
|
|
func main() {
|
|
versionFlag := flag.Bool("version", false, "print version and exit")
|
|
flag.Parse()
|
|
if *versionFlag {
|
|
fmt.Println(generator.Version)
|
|
os.Exit(0)
|
|
}
|
|
|
|
g := bmgen.BmGenerator()
|
|
gen.Main(g)
|
|
}
|