helpers

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorBlack   = "\033[30m"
	ColorRed     = "\033[31m"
	ColorGreen   = "\033[32m"
	ColorYellow  = "\033[33m"
	ColorBlue    = "\033[34m"
	ColorMagenta = "\033[35m"
	ColorCyan    = "\033[36m"
	ColorWhite   = "\033[37m"

	BrightBlack   = "\033[30;1m"
	BrightRed     = "\033[31;1m"
	BrightGreen   = "\033[32;1m"
	BrightYellow  = "\033[33;1m"
	BrightBlue    = "\033[34;1m"
	BrightMagenta = "\033[35;1m"
	BrightCyan    = "\033[36;1m"
	BrightWhite   = "\033[37;1m"

	Bold      = "\033[1m"
	Underline = "\033[4m"
	Reversed  = "\033[7m"

	ColorReset = "\033[0m"
)

Variables

This section is empty.

Functions

func Contains

func Contains(slice []string, item string) bool

func ErrAndExit

func ErrAndExit(msg string)

func GetAppliedMigrationNames

func GetAppliedMigrationNames(rows *sql.Rows) ([]string, error)

func GetDirMigrations

func GetDirMigrations(cwd string) ([]string, error)

func IsValidMigrationName

func IsValidMigrationName(migrationName string) bool

func PromptForConfirmation

func PromptForConfirmation(prompt string) bool

func SortDirMigrations

func SortDirMigrations(migrations []string, ascending bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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