bufformat

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: 22 Imported by: 2 modules, 1 package

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 FormatBucket added in v1.32.0

func FormatBucket(ctx context.Context, bucket storage.ReadBucket, opts ...FormatOption) (_ storage.ReadBucket, retErr error)

FormatBucket formats the .proto files in the bucket and returns a new bucket with the formatted files. If WithDeprecate options are provided but no types match the prefixes, an error is returned.

func FormatFile added in v1.71.0

func FormatFile(dest io.Writer, file *ast.File) error

FormatFile formats the given file and writes the result to dest.

func FormatModuleSet added in v1.32.0

func FormatModuleSet(ctx context.Context, moduleSet bufmodule.ModuleSet, opts ...FormatOption) (_ storage.ReadBucket, retErr error)

FormatModuleSet formats and writes the target files into a read bucket.

Types

type FormatOption added in v1.65.0

type FormatOption func(*formatOptions)

FormatOption is an option for formatting.

func WithDeprecate added in v1.65.0

func WithDeprecate(fqnPrefix string) FormatOption

WithDeprecate adds a deprecation prefix. All types whose fully-qualified name starts with this prefix will have the deprecated option added to them. For fields and enum values, only exact matches are deprecated.

Jump to

Keyboard shortcuts

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