bufformat

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 18 Imported by: 1

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 FormatFileNode added in v1.28.0

func FormatFileNode(dest io.Writer, fileNode *ast.FileNode) error

FormatFileNode formats the given file node 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