Versions in this module Expand all Collapse all v1 v1.7.1 Jul 17, 2020 Changes in this version + var ErrInvalidSource = errors.New("parse failed: invalid proto source") + var ErrLookupImportAndProtoSet = errors.New("both LookupImport and LookupImportProto set") + var ErrNoSyntax = errors.New("no syntax specified; defaulting to proto2 syntax") + func ResolveFilenames(importPaths []string, fileNames ...string) ([]string, error) + type ErrorReporter func(err ErrorWithPos) error + type ErrorWithPos interface + GetPosition func() SourcePos + Unwrap func() error + type ErrorWithSourcePos struct + Pos *SourcePos + Underlying error + func (e ErrorWithSourcePos) Error() string + func (e ErrorWithSourcePos) GetPosition() SourcePos + func (e ErrorWithSourcePos) Unwrap() error + type FileAccessor func(filename string) (io.ReadCloser, error) + func FileContentsFromMap(files map[string]string) FileAccessor + type Parser struct + Accessor FileAccessor + ErrorReporter ErrorReporter + ImportPaths []string + IncludeSourceCodeInfo bool + InferImportPaths bool + InterpretOptionsInUnlinkedFiles bool + LookupImport func(string) (*desc.FileDescriptor, error) + LookupImportProto func(string) (*dpb.FileDescriptorProto, error) + ValidateUnlinkedFiles bool + WarningReporter WarningReporter + func (p Parser) ParseFiles(filenames ...string) ([]*desc.FileDescriptor, error) + func (p Parser) ParseFilesButDoNotLink(filenames ...string) ([]*dpb.FileDescriptorProto, error) + type SourcePos struct + Col int + Filename string + Line int + Offset int + func (pos SourcePos) String() string + type WarningReporter func(ErrorWithPos)