bufprotocompile

package
v1.76.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileAnnotationForErrorWithPos

func FileAnnotationForErrorWithPos(
	errorWithPos reporter.ErrorWithPos,
	options ...FileAnnotationOption,
) (bufanalysis.FileAnnotation, error)

FileAnnotationForErrorWithPos returns a new FileAnnotation for the ErrorWithPos.

This special-cases fs.PathErrors if there is FileInfo information. We know that if there is FileInfo information, and there is a fs.PathError, this can only happen due to import errors. Therefore, we print out a special message saying that the error is for an import.

func FileAnnotationSetForErrorsWithPos

func FileAnnotationSetForErrorsWithPos(
	errorsWithPos []reporter.ErrorWithPos,
	options ...FileAnnotationOption,
) (bufanalysis.FileAnnotationSet, error)

FileAnnotationSetForErrorsWithPos returns new FileAnnotations for the ErrorsWithPos.

This special-cases fs.PathErrors if there is FileInfo information. We know that if there is FileInfo information, and there is a fs.PathError, this can only happen due to import errors. Therefore, we print out a special message saying that the error is for an import.

Types

type FileAnnotationOption

type FileAnnotationOption func(*fileAnnotationOptions)

FileAnnotationOption is an option when creating a FileAnnotation.

func WithExternalPathResolver

func WithExternalPathResolver(externalPathResolver func(path string) string) FileAnnotationOption

WithExternalPathResolver returns a new FileAnnotationOption that will map the given path to an external path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL