Documentation
¶
Overview ¶
Package cmd contains the command-line interface code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoBuildInformation = errors.New("no build information available, can't obtain version")
)
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct {
LogLevel slog.LevelVar `kong:"optional,group='logging',env='LOG_LEVEL',default='info',placeholder='level',help='log level'"`
LogJSON bool `kong:"optional,group='logging',env='LOG_JSON',negatable,help='log using JSON'"`
LogSource bool `kong:"optional,group='logging',env='LOG_SOURCE',hidden,help='log source (filename and line number)'"`
CPUProfile *cpuprofiler.Profiler `kong:"optional,hidden,help='profile cpu destination',placeholder='FILENAME'"`
// Commands:
Lint LintCommand `kong:"cmd,default='',help='lint the commit messages in a git repository'"`
NextVersion NextVersionCommand `kong:"cmd,help='get next version (lint is recommended prior to running this)'"`
Version VersionCommand `kong:"cmd,help='show program version'"`
}
type LintCommand ¶
type LintCommand struct {
Repository *git.Repository `kong:"placeholder='path',default='.',help='repository to lint'"`
Revision plumbing.Revision `kong:"name='revision',aliases='rev',optional,default='HEAD',placeholder='REVISION',help='revision to start at'"`
OtherRevision plumbing.Revision `` /* 130-byte string literal not displayed */
}
type NextVersionCommand ¶
type NextVersionCommand struct {
Repository *git.Repository `kong:"arg,placeholder='path',default='.',help='repository to lint'"`
Revision plumbing.Revision `kong:"arg,name='revision',aliases='rev',optional,default='HEAD',placeholder='REVISION',help='revision to start at'"`
Output string `kong:"arg,type='path',default='-',help='where to output the next version'"`
VSuffix bool `kong:"default='true',negatable,help='output with v-suffix, i.e. v1.3.2'"`
WithPrerelease string `kong:"optional,help='add prerelease information to tag'"`
WithMetadata string `kong:"optional,help='add metadata to tag'"`
}
type StatusCode ¶
type StatusCode = int
const ( StatusOK StatusCode = iota StatusInternalError StatusBadArguments StatusFailure )
func Run ¶
func Run() StatusCode
type VersionCommand ¶
type VersionCommand struct{}
Click to show internal directories.
Click to hide internal directories.