pkg

package
v0.0.0-...-d28478c Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter struct {
	// contains filtered or unexported fields
}

Formatter visits a Proto and writes formatted source.

func NewFormatter

func NewFormatter(writer io.Writer, indentSeparator string) *Formatter

NewFormatter returns a new Formatter. Only the indentation separator is configurable.

func (*Formatter) Format

func (f *Formatter) Format(p *proto.Proto)

Format visits all proto elements and writes formatted source.

func (*Formatter) VisitComment

func (f *Formatter) VisitComment(c *proto.Comment)

VisitComment formats a Comment and writes a newline.

func (*Formatter) VisitEnum

func (f *Formatter) VisitEnum(e *proto.Enum)

VisitEnum formats a Enum.

func (*Formatter) VisitEnumField

func (f *Formatter) VisitEnumField(e *proto.EnumField)

VisitEnumField formats a EnumField.

func (*Formatter) VisitExtensions

func (f *Formatter) VisitExtensions(e *proto.Extensions)

VisitExtensions formats a proto2 Extensions.

func (*Formatter) VisitGroup

func (f *Formatter) VisitGroup(g *proto.Group)

VisitGroup formats a proto2 Group.

func (*Formatter) VisitImport

func (f *Formatter) VisitImport(i *proto.Import)

VisitImport formats a Import.

func (*Formatter) VisitMapField

func (f *Formatter) VisitMapField(m *proto.MapField)

VisitMapField formats a MapField.

func (*Formatter) VisitMessage

func (f *Formatter) VisitMessage(m *proto.Message)

VisitMessage formats a Message.

func (*Formatter) VisitNormalField

func (f *Formatter) VisitNormalField(f1 *proto.NormalField)

VisitNormalField formats a NormalField.

func (*Formatter) VisitOneof

func (f *Formatter) VisitOneof(o *proto.Oneof)

VisitOneof formats a Oneof.

func (*Formatter) VisitOneofField

func (f *Formatter) VisitOneofField(o *proto.OneOfField)

VisitOneofField formats a OneofField.

func (*Formatter) VisitOption

func (f *Formatter) VisitOption(o *proto.Option)

VisitOption formats a Option.

func (*Formatter) VisitPackage

func (f *Formatter) VisitPackage(p *proto.Package)

VisitPackage formats a Package.

func (*Formatter) VisitRPC

func (f *Formatter) VisitRPC(r *proto.RPC)

VisitRPC formats a RPC.

func (*Formatter) VisitReserved

func (f *Formatter) VisitReserved(r *proto.Reserved)

VisitReserved formats a Reserved.

func (*Formatter) VisitService

func (f *Formatter) VisitService(s *proto.Service)

VisitService formats a Service.

func (*Formatter) VisitSyntax

func (f *Formatter) VisitSyntax(s *proto.Syntax)

VisitSyntax formats a Syntax.

Jump to

Keyboard shortcuts

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