idodod / protoc-gen-fieldmask

A protoc plugin that generates fieldmask paths
MIT License
23 stars 3 forks source link

unparsable Go source: expected '}', found 'type' #46

Open danwt opened 1 year ago

danwt commented 1 year ago

I've built and installed the tool. Then using buf:

# buf.gen.yaml
# Generated by "buf config migrate-v1beta1". Edit as necessary, and
# remove this comment when you're finished.
version: v1
plugins:
  - name: go
    out: .
    opt: paths=source_relative
  - name: go-grpc
    out: .
    opt: paths=source_relative
  - name: fieldmask
    out: .

And running

✗ buf generate -o pkg/proto
Failure: plugin fieldmask: github.com/<repo>/../<filename>.pb.fieldmask.go: unparsable Go source: 296:1: expected '}', found 'type' (and 9 more errors)

I'm sorry I can't provide a narrower concrete example right now.

idodod commented 1 year ago

Hi @danwt , Thanks for reporting the issue. Would you mind sharing the proto file (or an example proto file) that reproduces the issue?