Documentation
¶
Index ¶
- func FormatBucket(ctx context.Context, bucket storage.ReadBucket, opts ...FormatOption) (_ storage.ReadBucket, retErr error)
- func FormatFileNode(dest io.Writer, fileNode *ast.FileNode) error
- func FormatModuleSet(ctx context.Context, moduleSet bufmodule.ModuleSet, opts ...FormatOption) (_ storage.ReadBucket, retErr error)
- type FormatOption
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
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.
Click to show internal directories.
Click to hide internal directories.