Documentation
¶
Overview ¶
Package vdiff provides visual protocol diff tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldDiff ¶
type FieldDiff struct {
Name string `json:"name"`
Type string `json:"type"` // added, removed, changed, unchanged
OldType string `json:"old_type,omitempty"`
NewType string `json:"new_type,omitempty"`
OldBits int `json:"old_bits,omitempty"`
NewBits int `json:"new_bits,omitempty"`
}
FieldDiff represents a difference in a single field.
type ProtocolDiff ¶
type ProtocolDiff struct {
ProtocolA string `json:"protocol_a"`
ProtocolB string `json:"protocol_b"`
Fields []FieldDiff `json:"fields"`
}
ProtocolDiff represents the diff between two protocol versions.
func Compare ¶
func Compare(nameA, nameB string, fieldsA, fieldsB []string) *ProtocolDiff
Compare compares two field lists and produces a diff.
func (*ProtocolDiff) Summary ¶
func (d *ProtocolDiff) Summary() string
Summary returns a summary of changes.
func (*ProtocolDiff) ToHTML ¶
func (d *ProtocolDiff) ToHTML() string
ToHTML generates an HTML side-by-side diff view.
func (*ProtocolDiff) ToText ¶
func (d *ProtocolDiff) ToText() string
ToText generates a text diff view.
Click to show internal directories.
Click to hide internal directories.