migration

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Symbol      string `yaml:"symbol" json:"symbol"`
	Replacement string `yaml:"replacement" json:"replacement"`
	Reason      string `yaml:"reason" json:"reason"`
}

type Map

type Map struct {
	Library    string      `yaml:"library" json:"library"`
	Migrations []Migration `yaml:"migrations" json:"migrations"`
}

func LoadMap

func LoadMap(path string) (Map, error)

func (Map) Select

func (m Map) Select(library, from, to string) ([]Entry, error)

func (Map) Validate

func (m Map) Validate() error

type Migration

type Migration struct {
	From    string  `yaml:"from" json:"from"`
	To      string  `yaml:"to" json:"to"`
	Symbols []Entry `yaml:"symbols" json:"symbols"`
}

type Options

type Options struct {
	Root    string
	Library string
	From    string
	To      string
	Map     Map
}

type Report

type Report struct {
	Library     string       `json:"library"`
	From        string       `json:"from"`
	To          string       `json:"to"`
	Suggestions []Suggestion `json:"suggestions"`
}

func Analyze

func Analyze(opts Options) (Report, error)

type Suggestion

type Suggestion struct {
	File      string `json:"file"`
	Line      int    `json:"line"`
	Column    int    `json:"column"`
	Symbol    string `json:"symbol"`
	Current   string `json:"current"`
	Suggested string `json:"suggested"`
	Reason    string `json:"reason"`
}

Jump to

Keyboard shortcuts

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