Documentation ¶
Index ¶
- type Formatter
- func (f *Formatter) Format(p *proto.Proto)
- func (f *Formatter) VisitComment(c *proto.Comment)
- func (f *Formatter) VisitEnum(e *proto.Enum)
- func (f *Formatter) VisitEnumField(e *proto.EnumField)
- func (f *Formatter) VisitExtensions(e *proto.Extensions)
- func (f *Formatter) VisitGroup(g *proto.Group)
- func (f *Formatter) VisitImport(i *proto.Import)
- func (f *Formatter) VisitMapField(m *proto.MapField)
- func (f *Formatter) VisitMessage(m *proto.Message)
- func (f *Formatter) VisitNormalField(f1 *proto.NormalField)
- func (f *Formatter) VisitOneof(o *proto.Oneof)
- func (f *Formatter) VisitOneofField(o *proto.OneOfField)
- func (f *Formatter) VisitOption(o *proto.Option)
- func (f *Formatter) VisitPackage(p *proto.Package)
- func (f *Formatter) VisitRPC(r *proto.RPC)
- func (f *Formatter) VisitReserved(r *proto.Reserved)
- func (f *Formatter) VisitService(s *proto.Service)
- func (f *Formatter) VisitSyntax(s *proto.Syntax)
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 ¶
NewFormatter returns a new Formatter. Only the indentation separator is configurable.
func (*Formatter) VisitComment ¶
VisitComment formats a Comment and writes a newline.
func (*Formatter) VisitEnumField ¶
VisitEnumField formats a EnumField.
func (*Formatter) VisitExtensions ¶
func (f *Formatter) VisitExtensions(e *proto.Extensions)
VisitExtensions formats a proto2 Extensions.
func (*Formatter) VisitGroup ¶
VisitGroup formats a proto2 Group.
func (*Formatter) VisitImport ¶
VisitImport formats a Import.
func (*Formatter) VisitMapField ¶
VisitMapField formats a MapField.
func (*Formatter) VisitMessage ¶
VisitMessage formats a Message.
func (*Formatter) VisitNormalField ¶
func (f *Formatter) VisitNormalField(f1 *proto.NormalField)
VisitNormalField formats a NormalField.
func (*Formatter) VisitOneof ¶
VisitOneof formats a Oneof.
func (*Formatter) VisitOneofField ¶
func (f *Formatter) VisitOneofField(o *proto.OneOfField)
VisitOneofField formats a OneofField.
func (*Formatter) VisitOption ¶
VisitOption formats a Option.
func (*Formatter) VisitPackage ¶
VisitPackage formats a Package.
func (*Formatter) VisitReserved ¶
VisitReserved formats a Reserved.
func (*Formatter) VisitService ¶
VisitService formats a Service.
func (*Formatter) VisitSyntax ¶
VisitSyntax formats a Syntax.