mirror of
https://github.com/fullstorydev/grpcurl.git
synced 2026-05-24 04:31:44 +03:00
update all deps; use new ResolveFilenames method (#103)
This commit is contained in:
@@ -58,9 +58,14 @@ func DescriptorSourceFromProtoSets(fileNames ...string) (DescriptorSource, error
|
||||
// whose contents are Protocol Buffer source files. The given importPaths are used to locate
|
||||
// any imported files.
|
||||
func DescriptorSourceFromProtoFiles(importPaths []string, fileNames ...string) (DescriptorSource, error) {
|
||||
fileNames, err := protoparse.ResolveFilenames(importPaths, fileNames...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p := protoparse.Parser{
|
||||
ImportPaths: importPaths,
|
||||
InferImportPaths: len(importPaths) == 0,
|
||||
ImportPaths: importPaths,
|
||||
InferImportPaths: len(importPaths) == 0,
|
||||
IncludeSourceCodeInfo: true,
|
||||
}
|
||||
fds, err := p.ParseFiles(fileNames...)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user