migrations

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Migrations is a list of all migrations Example structure: {"from": ">=2.0.0", "to": "<=3.*.*", "fn": [MigrateFN, MigrateFN]}

Functions

func DoMigration

func DoMigration(cmd *cobra.Command, cwd string, curr, target *semver.Version) error

DoMigration runs all migrations It will run all migrations that match the current and target version

func MigrateGoPkgs

func MigrateGoPkgs(cmd *cobra.Command, cwd string, curr, target *semver.Version) error

func MigrateGoVersion

func MigrateGoVersion(minVersion string) func(*cobra.Command, string, *semver.Version, *semver.Version) error

MigrateGoVersion ensures that all go.mod files referencing Fiber declare at least the provided Go version. Vendor directories are skipped.

Types

type Migration

type Migration struct {
	From      string
	To        string
	Functions []MigrationFn
}

Migration is a single migration

type MigrationFn

type MigrationFn func(cmd *cobra.Command, cwd string, curr, target *semver.Version) error

MigrationFn is a function that will be called during migration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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