interp

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package interp loads morphic migration .go files into an in-process *migrate.Registry using the yaegi interpreter, removing the need to compile the migrations module with the Go toolchain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadRegistry

func LoadRegistry(migrationsDir string) (*migrate.Registry, error)

LoadRegistry reads every *.go file in migrationsDir (except main.go), interprets them with yaegi, and returns a freshly-populated *migrate.Registry.

Each migration file's init() calls migrate.Register, which is intercepted here and routed into the returned registry rather than the package-level global. This lets the function be called multiple times in a single process without duplicate-registration panics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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