cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JoneFolderPath = "jone"
	JoneFilePath   = "jone/jonefile.go"
	MigrationsPath = "jone/migrations"
)

Paths relative to project root

View Source
const RuntimePackage = "github.com/Grandbusta/jone"

RuntimePackage is the import path for the jone library

Variables

View Source
var MigrationDirPattern = regexp.MustCompile(`^\d+_`)

MigrationDirPattern matches migration folder names (e.g., "20260114035749_add_users")

View Source
var Version = "v0.1.1"

Version is the current version of jone. Update this before each release.

Functions

func Execute

func Execute()

func FindOrCreateGoMod

func FindOrCreateGoMod(cwd string) string

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

func JoneDependencyPresent(modPath string) bool

JoneDependencyPresent checks whether go.mod lists the jone module as a dependency.

func ReadModulePath

func ReadModulePath(projectRoot string) string

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

func RegenerateRegistry(projectRoot string) error

RegenerateRegistry scans the migrations folder and regenerates registry/registry.go.

Types

type RunExecParams

type RunExecParams struct {
	Command string
	Flags   map[string]any
	Args    []string
}

Jump to

Keyboard shortcuts

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