yoheimuta / go-protoparser

Yet another Go package which parses a Protocol Buffer file (proto2+proto3)
MIT License
166 stars 20 forks source link

Import is used? #87

Open ZergsLaw opened 2 months ago

ZergsLaw commented 2 months ago

How I can get information - import is used or not?

yoheimuta commented 2 months ago

@ZergsLaw Yes. Import is defined in https://pkg.go.dev/github.com/yoheimuta/go-protoparser/v4@v4.10.0/parser#Import. You can see the example output here:https://github.com/yoheimuta/go-protoparser/blob/master/README.md?plain=1#L129-L148.

ZergsLaw commented 2 months ago

I mean, is there a way to check that a specific import is being used?

For example - myVarWithImport.IsUsed() ?