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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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