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

migrate

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package migrate checks collection format versions and plans the steps that upgrade older files to the current format.

Index

Constants

View Source
const CurrentFormat = 1

CurrentFormat is the collection format this version of Flow-I writes.

Variables

This section is empty.

Functions

func Check

func Check(format int) diag.Diagnostic

Check validates a manifest's format number. It returns the zero Diagnostic when the format is supported.

Types

type Step

type Step struct {
	From     int
	Describe string
	Apply    func(files map[string][]byte) (map[string][]byte, error)
}

Step upgrades every file of a collection from format From to From+1. Files maps collection-relative paths to contents.

func Plan

func Plan(from int) ([]Step, error)

Plan returns the steps that move a collection from format `from` to CurrentFormat, in order.

func Steps

func Steps() []Step

Steps returns every known migration. Format 1 is the first format, so there are none yet.

Jump to

Keyboard shortcuts

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