Documentation
¶
Overview ¶
Package core provides minimal utilities for CLI tools and code generation. This package has minimal dependencies and can be used without the full framework.
Package core provides minimal utilities for CLI tools and code generation.
Index ¶
- Variables
- func CreateDirIfNotExists(path string) error
- func CreateFileIfNotExists(path string) error
- func FileExists(path string) bool
- func MigrateDownAll(rootPath, dsn string) error
- func MigrateForce(rootPath, dsn string) error
- func MigrateSteps(steps int, rootPath, dsn string) error
- func MigrateUp(rootPath, dsn string) error
- func RandomString(n int) string
- type CLIConfig
Constants ¶
This section is empty.
Variables ¶
var Version = "dev"
Version is the framework version (injected at build time via ldflags) Use: go build -ldflags "-X github.com/jimmitjoo/tjo/core.Version=x.y.z"
Functions ¶
func CreateDirIfNotExists ¶
CreateDirIfNotExists creates a directory if it doesn't exist
func CreateFileIfNotExists ¶
CreateFileIfNotExists creates an empty file if it doesn't exist
func MigrateDownAll ¶
MigrateDownAll rolls back all migrations
func MigrateForce ¶
MigrateForce forces the migration version without running migrations
func MigrateSteps ¶
MigrateSteps runs n migrations (positive = up, negative = down)
func RandomString ¶
RandomString generates a cryptographically secure random string of the given length. Uses crypto/rand for secure randomness.