Documentation ¶
Index ¶
- Variables
- func CLIExample(s string) string
- func CLIHelp(s string) string
- func CLIShort(s string) string
- func CheckPath(p string) string
- func RepoPath(p string) string
- func Validate(vars ...Required) error
- func VersionString() string
- type Config
- type Flags
- type LogAdapter
- type LogFormat
- type Required
- type StateT
- func (state StateT) Configfile() Variable[string]
- func (state StateT) Database() Variable[string]
- func (state StateT) LogFormat() Variable[LogFormat]
- func (state StateT) Logger() (*log.Logger, LogAdapter)
- func (state StateT) Migrations() Variable[string]
- func (state *StateT) Parse()
- func (state StateT) TableName() Variable[string]
- type Variable
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "unknown" //nolint:gochecknoglobals Commit = "unknown" //nolint:gochecknoglobals )
These will be set at build time with ldflags, see Justfile for how they're defined and passed.
View Source
var DocsLink = color.New(color.Faint).Sprint(
"Docs: https://github.com/peterldowns/pgmigrate",
)
Functions ¶
func CLIExample ¶
CLIExample is a helper for generating CLI example docs for cobra commands. It removes any surrounding space from a string, then removes any leading whitespace from each line in the string. Any comments in the string will be colored as fainter than the rest of the text.
func VersionString ¶
func VersionString() string
Types ¶
type LogAdapter ¶
type Variable ¶
type Variable[T comparable] struct { // contains filtered or unexported fields }
func NewVariable ¶
func NewVariable[T comparable](name string, values ...T) Variable[T]
Click to show internal directories.
Click to hide internal directories.