1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-02-03 13:11:42 +02:00

23 lines
447 B
Go
Raw Normal View History

package main
import (
"os/exec"
)
const (
2019-06-21 10:18:33 +08:00
_getBMGen = "go get -u github.com/bilibili/kratos/tool/protobuf/protoc-gen-bm"
_bmProtoc = "protoc --proto_path=%s --proto_path=%s --proto_path=%s --bm_out=:."
)
func installBMGen() error {
if _, err := exec.LookPath("protoc-gen-bm"); err != nil {
if err := goget(_getBMGen); err != nil {
return err
}
}
return nil
}
2019-10-29 00:20:44 +08:00
func genBM(files []string) error {
return generate(_bmProtoc, files)
}