more recursion fixing
This commit is contained in:
Родитель
65fd105923
Коммит
f13d7bab83
4
Makefile
4
Makefile
|
@ -58,8 +58,8 @@ examples: $(BQ_PLUGIN)
|
|||
run:
|
||||
go build -o ~/bin/protoc-gen-bq-schema cmd/main.go
|
||||
protoc \
|
||||
-I ~/commerce/commerce-apis/ \
|
||||
-I ~/commerce/commerce-apis/third_party/ \
|
||||
-I ~/proto/commerce-apis/ \
|
||||
-I ~/proto/googleapis/ \
|
||||
--bq-schema_out=.scratch \
|
||||
--bq-schema_opt=single-message \
|
||||
--bq-schema_opt=Mcommerce/order.created.proto=subscription \
|
||||
|
|
|
@ -95,8 +95,10 @@ func _traverseField(pkgName string, bqField *BQField, protoField *descriptor.Fie
|
|||
)
|
||||
if _, ok := parentMessages[desc]; !ok {
|
||||
if IsRecordType(inner) {
|
||||
parentMessages[desc] = true
|
||||
innerBQField = _traverseField(pkgName, innerBQField, inner, desc, parentMessages)
|
||||
bqField.Fields = append(bqField.Fields, innerBQField)
|
||||
parentMessages[desc] = false
|
||||
} else {
|
||||
bqField.Fields = append(bqField.Fields, innerBQField)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче