Help us shape the future of Go! Take the 2026 Go Developer Survey

migration

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package migration compares implementation semantic profiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RuleDefinitions

func RuleDefinitions() map[string]string

func WriteJSON

func WriteJSON(report Report) ([]byte, error)

func WriteText

func WriteText(report Report) string

Types

type Category

type Category string
const (
	Unchanged              Category = "unchanged"
	BehavioralDifference   Category = "behavioral-difference"
	SourceChangeRequired   Category = "source-change-required"
	WireFormatChange       Category = "wire-format-change"
	DecodeOnlyChange       Category = "decode-only-change"
	EncodeOnlyChange       Category = "encode-only-change"
	UnknownCustomMarshaler Category = "unknown-custom-marshaler"
)

type Finding

type Finding struct {
	ID             string   `json:"id"`
	Fingerprint    string   `json:"fingerprint"`
	Category       Category `json:"category"`
	Package        string   `json:"package"`
	TypeName       string   `json:"type"`
	FieldPath      string   `json:"field,omitempty"`
	Message        string   `json:"message"`
	V1             any      `json:"json_v1,omitempty"`
	V2             any      `json:"json_v2,omitempty"`
	Impact         string   `json:"impact"`
	Recommendation string   `json:"recommendation"`
}

type Report

type Report struct {
	FormatVersion int              `json:"format_version"`
	Toolchain     string           `json:"toolchain"`
	V2Available   bool             `json:"v2_available"`
	Summary       map[Category]int `json:"summary"`
	Findings      []Finding        `json:"findings"`
}

func Analyze

func Analyze(contracts []*contract.StructContract, registry semantics.Registry) Report

Jump to

Keyboard shortcuts

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