go-protoparser icon indicating copy to clipboard operation
go-protoparser copied to clipboard

Import is used?

Open ZergsLaw opened this issue 1 year ago • 3 comments

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

ZergsLaw avatar May 04 '24 19:05 ZergsLaw

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

yoheimuta avatar May 05 '24 01:05 yoheimuta

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

For example - myVarWithImport.IsUsed() ?

ZergsLaw avatar May 05 '24 09:05 ZergsLaw

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

How to set the include path which contains the proto files ?

12345dotblue avatar Aug 20 '24 06:08 12345dotblue