vdiff

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

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