migrate

package
v2.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 21 Imported by: 0 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 migrate converts v1 ai-toolkit projects to v2 (docs/spec/migration-v1.md). It is lossless (every rewritten file is copied to docs/ai/_legacy/ first) and idempotent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StatusMap added in v2.1.0

func StatusMap(raw string) string

StatusMap implements the status mapping table.

Types

type Report

type Report struct {
	Project   string         `json:"project"`
	AlreadyV2 bool           `json:"already_v2,omitempty"`
	DryRun    bool           `json:"dry_run"`
	Counts    map[string]int `json:"counts"`
	Warnings  []string       `json:"warnings,omitempty"`
	Written   []string       `json:"written,omitempty"`
	Removed   []string       `json:"removed,omitempty"`
	Legacy    []string       `json:"legacy,omitempty"`
	V1Tokens  int            `json:"v1_tokens"`
	// contains filtered or unexported fields
}

Report describes a migration.

func Run

func Run(dir string, dryRun bool) (*Report, error)

Run migrates the project containing dir.

Jump to

Keyboard shortcuts

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