Add --go_opt flag to adapt to the version after 1.4.0 of protoc-gen-go (#767)
Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>
This commit is contained in:
@@ -11,8 +11,11 @@ type DefaultGenerator struct {
|
||||
log console.Console
|
||||
}
|
||||
|
||||
// just test interface implement
|
||||
var _ Generator = (*DefaultGenerator)(nil)
|
||||
|
||||
// NewDefaultGenerator returns an instance of DefaultGenerator
|
||||
func NewDefaultGenerator() *DefaultGenerator {
|
||||
func NewDefaultGenerator() Generator {
|
||||
log := console.NewColorConsole()
|
||||
return &DefaultGenerator{
|
||||
log: log,
|
||||
@@ -33,5 +36,6 @@ func (g *DefaultGenerator) Prepare() error {
|
||||
}
|
||||
|
||||
_, err = exec.LookPath("protoc-gen-go")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user