cli

package
v0.0.0-...-d4132e8 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package cli provides a command line interface for database migrations using the popular cobra CLI package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateCommand

func MigrateCommand(ctx context.Context, f NewWorkerFunc) *cobra.Command

MigrateCommand returns a cobra command that can be integrated into a command line program.

Pass context.Background() for the context, or alternatively pass a context that will cancel when the user interrupts by pressing Ctrl-C or similar.

Types

type NewWorkerFunc

type NewWorkerFunc func() (*migration.Worker, error)

NewWorkerFunc is called to creata a migration worker.

Jump to

Keyboard shortcuts

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