Documentation
¶
Index ¶
Constants ¶
const ( JoneFolderPath = "jone" JoneFilePath = "jone/jonefile.go" MigrationsPath = "jone/migrations" )
Paths relative to project root
const RuntimePackage = "github.com/Grandbusta/jone"
RuntimePackage is the import path for the jone library
Variables ¶
var MigrationDirPattern = regexp.MustCompile(`^\d+_`)
MigrationDirPattern matches migration folder names (e.g., "20260114035749_add_users")
var Version = "v0.1.1"
Version is the current version of jone. Update this before each release.
Functions ¶
func FindOrCreateGoMod ¶
FindOrCreateGoMod checks for go.mod and optionally creates it interactively. Returns the path to go.mod on success, or an empty string on failure/abort.
func JoneDependencyPresent ¶
JoneDependencyPresent checks whether go.mod lists the jone module as a dependency.
func ReadModulePath ¶
ReadModulePath extracts the module path from go.mod in the given project root. Returns an empty string if go.mod doesn't exist or can't be read.
func RegenerateRegistry ¶
RegenerateRegistry scans the migrations folder and regenerates registry/registry.go.